I took several product pictures for a client that they made with a brand. The images were used for social media. No contract on my end with my client. That client worked for an agency but she owned all her clients. They separated ways and now the agency is saying they own all pictures I took and edited. I recently reposted the same pictures on my clients social and the agency sent my client a cease and desist type email. To remove any duplicated images because they owned the rights. To my knowledge I own the pictures as the photographer and I can share them as I please. Am I wrong?
I suspected, and I'm not the only one, that this might fall under the doctrine of "work for hire" as the photos were taken to fulfil a specific commission from a paying client. However, since all parties involved are based in California the jurisdiction is clearly California. US copyright law says that works only fall under "work for hire" when created by an employee or in a set of quite specific circumstances which require (among other things which may also be relevant) a written agreement that it's a work for hire. Unless your contract with your client includes those words, you're correct to believe that you own the rights. (As a side note, California law apparently says that all contracts for work for hire constitute contracts of employment - although this seems to me to contradict a US Supreme Court ruling of 1989).
There are a further complications in assignment of rights and exclusive licences, but again they would have to be mentioned explicitly in the contract.
In short: you're in the right.
Of course, it's one thing to be right and another to win the argument. You should think about whether it's wise to engage a lawyer, or if you can't afford that then see whether anyone (e.g. a university law school) near you offers a free legal clinic, before you write back to them, lest you accidentally shoot yourself in the foot.1 And you should ask yourself how far you want to take this: what's your tolerance for cost, time, and stress?
1 I'd be tempted to say "If you're claiming that I'm your employee then you owe me wages with interest", but that might not be a good idea...
Standard disclaimer: I'm not a lawyer, and I don't even play one on TV. I do know from experience that being taken to court, even when you're in the right, is quite unpleasant.