Celebrities and the paparazzi have a notoriously tense relationship. From accusations of invasion of privacy to criticism of unflattering photos, stars have regularly hit out at those who are paid to pursue them.

But in the last couple of years, a new wave of complaints has started flowing from the other side.

A number of well-known celebrities, including Jennifer Lopez and model Gigi Hadid, have had lawsuits filed against them for posting paparazzi images on their social media accounts.

So what exactly is going on with these copyright disputes?

You might think that being the subject of an image means you can use it freely.

But according to copyright law, it's the photographer who usually owns an image's rights unless it's been licensed to a third party like their agency or employer.

So whether you're a celebrity who has been papped leaving the latest Hollywood hotspot or someone who posed for a friend, the ownership of the photograph typically falls to the person who pressed the button.

Neel Chatterjee, a US lawyer who specialises in high-profile intellectual property disputes, says social media has created an "enormous amount of complexity" in the field.

He says in part the problem is caused because functions like online re-tweets allow images to proliferate quickly far beyond the control of the copyright holder.

In recent lawsuits, photograph agencies have claimed that it's not fair for celebrities to reproduce and distribute their images to their millions of fans without license. Some have even appealed for compensation for loss of earnings.

The stakes are made even higher because of the monetary value of some of the social media feeds in question, with some earning up to $1m per sponsored post on platforms like Instagram.

Khloe Kardashian was among the first people to be publicly pursued in one of these copyright cases.

She was sued for infringement in 2017 after posting a paparazzi photograph of herself visiting a Miami restaurant on her Instagram feed.

Xposure Photos, a UK based agency, sought damages of more than $175,000 for the post.

They said the image, which had been exclusively licensed to the Daily Mail, was used by Khloe without their permission and their accreditation had been erased.

They argued her post, shared to almost 67m followers, constituted "wilful, intentional, and malicious" infringement of their copyright.

Kardashian eventually deleted the image and both sides agreed to dismiss the suit last year.

But the star has acknowledged the row is an ongoing problem for her and her sisters.

She told Twitter fans that it might take longer for her to share images from events because she had to obtain proper permission first.

"I have to license my own image which blows my mind," she said in reply to one fan.

"They can legally stalk me and harass me and then on top of it all I can't even use the pictures of myself they take LOL," she tweeted to another.

Last week, model Gigi Hadid became the latest star to be slapped with a lawsuit over an image she posted of herself.

A complaint against the model alleges that her Instagram account "includes at least 50 examples of uncredited photographs of Hadid in public, at press events, or on the runway".

It was reported last month that Jennifer Lopez is being sued in a similar case involving an image posted on her Instagram story - a temporary post that disappears after 24 hours.

They are several more examples of a similar nature and the problem looks unlikely to go away.

The rise of 'copyright trolling'
Mr Chatterjee says these cases are becoming known within the industry as "copyright trolling".

He believes photo agencies are exploring it as a "new and incremental way" of increasing their revenue streams.

"They're going to take a picture outside a nightclub or restaurant whether or no they have a relationship with this famous person or not," he says, when asked if paparazzi should be worried about offending stars.

And it's not just celebrities themselves being targeted.

A number of so-called "fan accounts" have also reported being aggressively pursued on copyright grounds, with some apparently being shutdown altogether in the process.

When some Kardashian fans complained about the problem last year, Kim said her family was even considering hiring their own photographers to try and bypass the problem.

"It's just one of those things that offends common sense," Mr Chatterjee says of the copyright law.

"If someone's harassing me and takes a photograph of me and I happen to like the picture and want to make use of it, after they harassed me and made money from me - now they can sue me for that?"

He also cast doubt on accusations of loss of earnings.

"If you look at Kylie Jenner for example," he says. "You know when she promotes something. her distribution is so much broader that anything these agencies would be able to achieve.

"In some ways they amp up the iconic nature of some of these images."

Do the celebrities have a defence?
US National Football League (NFL) star Odell Beckham Jnr is another person embroiled in a legal battle involving paparazzi.

The player, who has more than 12 million Instagram followers, accused one agency of extortion last year after allegedly receiving a demand for a $40,000 payment over an image he had shared.

Reports regarding the lawsuit said he wanted to defend himself over his "rights to publicity" - conditions within some states' laws which protect a person's right to control how their name or likeness is used commercially.

The defence has been used before.

In 2014 actress Katherine Heigl sued a US drugstore chain after they used a paparazzi image of her carrying the pharmacy's shopping bags for promotion on social media. That case was eventually dropped, apparently in return for the post's deletion and a confidential donation to a charity.

But, as Mr Chatterjee points out, this defence in regards to paparazzi copyright complaints remains complex and largely untested in case law.

Of the lawsuits filed against celebrities so far, many have been dismissed or settled before being litigated to resolution.

"You'll see people offering to settle for say $10-20,000," he says, "Which seems like a lot of money but in context of litigation costs it's really not that much - especially for these high profile figures."

"It's going to take someone like a Kardashian who has tons of money who sees other commercial benefits by litigating these questions. It very well may take someone like that to actually fight this stuff."