The suspect in a gun attack at YouTube's HQ in California had expressed anger over its treatment of her video postings, media reports say.

Police have named Nasim Aghdam, 39, as the suspect but say they are still investigating a motive.

US media say Aghdam was angry that YouTube was filtering her videos and reducing the money she could make.

Tuesday's attack left a man and two women injured with gunshot wounds. The attacker shot herself dead.

Police in San Bruno, California, say there is no evidence yet that the attacker knew the victims, a 36-year-old man said to be in a critical condition, and two women aged 32 and 27.

What do we know of the suspect?

Nasim Aghdam lived in San Diego in southern California.

Police have revealed few details about her but US media said she ran a number of channels and a website, posting videos on a variety of subjects including those highlighting animal cruelty. The channels have now been deleted.

Aghdam has been variously described as a vegan bodybuilder, artist and rapper.

In January 2017 she posted a video complaining that YouTube was filtering her content, leading to fewer views.

On her website she also ranted against YouTube, saying: "Videos of targeted users are filtered and merely relegated, so that people can hardly see their videos."

She also quotes Adolf Hitler, saying: "Make the lie big, make it simple, keep saying it, and eventually they will believe it."

She also wrote: "There is no equal growth opportunity on YouTube or any other video sharing site. Your channel will grow if they want [it] to!"

Aghdam's father, Ismail, told local US media she was angry because YouTube had stopped paying her for videos.

Video posters can receive money from linked advertisements but the company can "de-monetise" channels for various reasons, taking adverts off. It is unclear if this happened with Aghdam's material.

Her father said Aghdam had been reported missing on Monday after not answering calls for two days. Police later found her sleeping in her car in Mountain View, 25km (15 miles) south of the YouTube offices in San Bruno and reported this to her family, but they did not detain her.

Her father told police she might go to YouTube as she "hated the company", local media said.

YouTube terminated her account following the shooting. Her Instagram and Facebook accounts have also been removed.

However, many Twitter users posted her Facebook video rant against YouTube.

What happened in the attack?

The suspect is reported to have approached an outdoor patio and dining area at the offices in San Bruno, near San Francisco, at about lunchtime on Tuesday and opened fire with a handgun.

San Bruno Police Chief Ed Barberini said officers arrived at the offices at 12:48 (19:48 GMT) local time to find a "chaotic scene", with numerous people fleeing.

Images broadcast on local TV stations showed employees leaving with their hands raised. Other footage showed evacuees forming a queue before being individually frisked by police.

Police said officers had "encountered one victim with an apparent gunshot wound at the site and two additional gunshot victims that had fled to a neighbouring business".

Inside the complex, officers then found a woman dead from a gunshot wound that was believed to be self-inflicted.

An employee at a nearby fast food restaurant told Fox station KTVU he had treated a young woman who suffered a bullet wound to the leg.

He said he had fashioned a makeshift tourniquet from a bungee cord as they waited for first responders.

Several YouTube employees tweeted about the attack as it was taking place.

Product manager Todd Sherman said people fled the building in panic as the shooting unfolded.

Another employee, Vadim Lavrusik, tweeted he was barricaded in a room with other staff. He later said he had been evacuated.

The three wounded were taken to Zuckerberg San Francisco General Hospital. Officials said the 32-year-old woman's condition was serious and the 27-year-old's condition was fair.

A fourth person was also taken to hospital with an ankle injury sustained while trying to escape, Mr Barberini said.

Some 1,700 people work at the YouTube HQ. The company is owned by Google and is the area's biggest employer.

There had been earlier media reports that the man shot was Aghdam's boyfriend, but police later said; "At this time there is no evidence that the shooter knew the victims of this shooting or that individuals were specifically targeted."

Such "active shooter" incidents are overwhelmingly carried out by men - an FBI report found that out of 160 incidents between 2000-2013, only six of the people who opened fire were women.

What's the reaction been?

YouTube spokesman Chris Dale praised the police response to the incident.

"Today it feels like the entire community of YouTube and all of the employees were victims of this crime. Our hearts go out to those who suffered in this particular attack," he said.

President Donald Trump said he had been briefed about the incident.
Another online giant, Twitter, said it was horrified by the shooting and said it was monitoring instances of misinformation.