Harry Potter star Matthew Lewis
Harry Potter actor Matthew Lewis has gotten into shape for his role in forthcoming rom-com Me Before You REUTERS/David Manning

The social media world has been left in amazement over the sexy photo shoot featuring Harry Potter actor Matthew Lewis, but author J.K. Rowling is far from impressed.

In the spread for Attitude magazine, the 25-year-old, who played character Neville Longbottom, is almost unrecognisable wearing little more than a pair of white boxer shorts, putting his toned physique on display.

Nostalgic Harry Potter fans are shocked at the British actor's incredible transformation considering he once wore a fat suit to play Longbottom, however, Rowling, 45, has had the best reaction.

Referencing actor Daniel Radcliffe's full-frontal performance in stage production Equus, Rowling tweeted:

For those wondering, Lewis' new image was encouraged by his role as a personal trainer in his upcoming rom-com Me Before You, which stars Game Of Thrones actress Emilia Clarke.

The actor told Attitude: "I've never considered myself to be good-looking at all. Just average. My character, Patrick, is a triathlete and personal trainer, so he's totally focused on the race that he's going to be running.

"I spoke to the director [Thea Sharrock] and I said it'd be nice to get into the mindset of someone like that, because he's not drinking alcohol, he's just eating salads all the time."

He added: "And I was very interested to know where you go to in your mind to have that level of commitment. So I sort of gave up alcohol - I say sort of, I have given up alcohol."

The Harry Potter and the Philosopher's Stone actor admits that his commitment to the role actually went beyond getting his body into shape.

Matthew Lewis
Before: Lewis used to wear a fat suit while playing Harry Potter character Neville Longbottom Andrew H. Walker/Getty Images

He told the magazine: "Apparently triathletes shave their legs for added aerodynamics, to buy you that extra couple of milliseconds. And my character, that is what he would do, so I think I'll be losing the leg hair! I haven't waxed before."

Since the Harry Potter franchise wrapped up in 2010, Longbottom has starred in a range of movies and TV projects, including The Syndicate, Death In Paradise, Bluestone 42, and The Rise.

Reactions to Neville Longbottom being pictured in his underwear have been priceless. Some of the best include: