Okay, so I'm a bit of a nut about this.
This has always been a freak out point for me for years just because I know how one simple oversight can land you in a heap of legal problems. Don't worry though, I've got your back :)
One of my clients called me with his wife almost in tears a few months ago. Said they received an invoice for $16,000 for Two Images on their site I built!
I was able to tell them not to worry because I use ONLY Licensed pics. I literally pay thousands of dollars a year, every year, for the rights to use legal pictures for YOU, my clients. I explain this to people when they hire me but so few actually understand how important it is.
So, I called my Rep, at the place I purchased the pictures in question, he sends the license info for the 2 pics in and the potential devastating lawsuit went away for my client. They absolutely could have lost their business if they got hit with a bill like that.
My Rep told me this happens about 10x a month with this one guy alone they worked with. This is a huge stock image company too and why I pay so much every year.
Here's how it will go. So a photographer gets his pics up on a sale site. Leaves them there for a few years, contract ends with photo selling company and now he targets anyone that has his photos. Easily done through "image reverse lookup" sites.
If they or you can't provide a license, he takes them to court and WINS! It's crazy but true.
I literally talked with a lawyer not long ago that called me for a website. I was going on my "and you don't have to worry about images" rant and he said. 'Oh, I had to negotiate a case like that, a church had one picture of a drop of water and they got sued. It was awful.' Needless to say, this lawyer understands how ugly it can get for little companies or even a rural church that doesn't know any better.
I go nuts about this and though my contract is small however, the one statement that is on everything, goes something like this:
The Client agrees to indemnify and hold harmless Jennifer Design against any and all claims, costs, and expenses, including attorney’s fees, due to materials included in the work at the request of the Client for which no copyright permission or previous release was requested or uses which exceed the uses allowed pursuant to a permission or release.
Also, if you provide any images for this or any project we work on together, you must prove ownership/license info/receipt. If you can't, I will provide images or will be fully indemnified if proceedings occur regarding any image copyright litigation. It's simple, you either own it, (took the picture yourself) or you have rights to use it and can show proof confirming that, or we don't use it.
You really have to protect yourself, contact a copyright lawyer yourself if you have any questions or if you have other work out there you're wondering about, it's worth an hour of your time to see how to best handle it.