Six Ryanair cabin crew members were fired after they allegedly staged a photo that depicted them sleeping on the floor of a Spanish airport office last month.

The image, which the airline said was staged, was widely shared online and reported by media outlets around the world. Critics cited the image of the crew members, which was posted on the Facebook page Ryanair Must Change, to highlight claims Ryanair treats its staff poorly.

The crew members were "dismissed" on Monday for breach of contract on grounds of "gross misconduct,” a Ryanair spokeswoman told NBC News on Wednesday.

This is a Ryanair 737 crew based in Portugal, stranded in Malaga, Spain a couple of nights ago due to storms. They are sleeping on the floor of the Ryanair crew room. RYR is earning €1.25 billion this year but will not put stranded crews in a hotel for the night. @peterbellew ? pic.twitter.com/lILWZVqqGj — Jim Atkinson (@Jimbaba) October 14, 2018

The spokeswoman said the crew members staged the photo to support a false claim that they were forced to sleep on the floor while grounded at the Malaga-Costa del Sol Airport, on the south coast of Spain, in the early morning hours of Oct. 13 because of storms in the Portuguese city, Porto.

"The crew spent a short period of time in the crew room before being moved to a VIP lounge, and returned to Porto the next day," the airline said after the image circulated.

Ryanair released video footage via Twitter exposing the photo as "fake."

Ryanair exposes fake photo of cabin crew sleeping in crew room. Watch video here: pic.twitter.com/tzTn6EHsKH — Ryanair (@Ryanair) October 17, 2018

The airline said the crew members' behavior "damaged their employer's reputation and caused an irreparable breach of trust with these six persons."

Ryanair has been at the center of controversies in recent months.

In September, roughly 2,000 employees of the budget airline, including cabin crew in Spain, Italy, Portugal, Germany, Belgium, and the Netherlands, walked out for 24 hours in a long-running dispute over pay and labor contracts. The move resulted in Ryanair canceling 250 flights across Europe.

In October, the airline faced criticism after allowing a passenger who directed a racist rant at a black elderly woman to stay on the flight from Barcelona to London. Many people criticized the company for switching the woman's seat and not removing the man — who was yelling and cursing — from the plane. A week after the incident, the airline moved to distance itself from the backlash.

Ryanair said it only became aware of the incident via footage on social media recorded by a fellow passenger, and issued an apology.