Actor Ansel Elgort has stripped down on Instagram for a good cause. The Baby Driver star posted a naked photo of himself in the shower to help raise funds for frontline workers in New York amid the coronavirus pandemic.

"OnlyFans. LINK IN BIO," the 26-year-old captioned the thirst trap, referencing the OnlyFans social media service where adult entertainers can earn money directly from subscribers.

Ansel Elgort has since deleted his nude photo from Instagram. (Instagram)

Naturally, curious followers clicked on the link only to find themselves being directed to a crowdfunding page that lists retailers and eateries providing food for frontline workers in Brooklyn, the borough not far from Manhattan, where Elgort grew up.

"Our goal is to fund each Brooklyn for Life! restaurant, enabling them to provide — at no cost to the recipients — at least 75-100 meals per day for delivery to the Brooklyn frontlines of this pandemic," read a statement on the crowdfunding page. "In doing this, we'll keep Brooklyn's grills & ovens hot to feed our community healthcare warriors and keep some of our vital local small businesses and members of their staff afloat in tough times."

And while the donations skyrocketed following Elgort's nude pic — currently sitting at US$208,848 (approx. $332,000) on April 22 — the actor hopes it continues to do so despite Instagram allegedly forcing him to take down the photo.

"Hey guys. I just wanna say thanks a lot. Everyone has raised a lot of money… It was worth it," he said in an Instagram Stories video. "Unfortunately, Instagram told me I have to put my post down because it's nudity, so I'm going to take it down. Maybe I'll post the version that cuts a little higher.

"Sorry about that, Instagram. Sorry if I offended anybody, but we did a good thing," he concluded, before adding, "And my dad took the picture, by the way. He was mad he said I needed to give him credit."

Coronavirus: What you need to know

What is social distancing?

Social distancing involved minimising contact with people and maintaining a distance of over one metre between you and others.

When practicing social distancing, you should avoid public transport, limit non-essential travel, work from home and skip large gatherings.

It is okay to go outdoors. However, when you do leave home, avoid touching your face and frequently wash your hands.

Coronavirus (Nine)

If I'm young and healthy, do I still have to practice social distancing?

Yes. While older people are at higher risk of contracting COVID-19, young people are not immune. People that show mild or no symptoms may still pass the virus to others, particularly in the early stages of the infection, before many patients realise that they are sick.