(CNN) Ryanair says it has sacked six employees for allegedly staging a photo of themselves sleeping on the floor at Malaga Airport in Spain, where cabin crew had to stay overnight because of weather issues.

The image surfaced on October 14 after flights to the Portuguese city of Porto were disrupted because of storms and several flights were diverted to Malaga. The photo was then widely shared online.

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

Security footage then released by the budget airline showed the employees getting into position on the floor for the photo. After the photo is taken, the flight crew can be seen getting up and walking away.

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

Ryanair confirmed the staff were fired on November 5 for "breach of contract on grounds of gross misconduct."

Portuguese union SNPVAC has not responded to CNN's request for comment on the video, or the firing of the employees.

Read More