Ever wonder what the secret is so a successful selfie?

New research fails to find the reason why people are taking them but it has discovered how to compose a shot to make it as popular as possible.

Aditya Khosla, a PhD student at MIT's Computer Science and Artificial Intelligence Lab (CSAIL), has developed an algorithm -- based on information gathered from over 2 million images posted to Flickr -- that can accurately predict how popular an image is going to be.

As part of the research, Khosla has even set up a website where anyone can upload an image and the algorithm will predict its potential popularity.

According to the researchers, if you want to get as many people as possible to view your selfie, it needs to feature three things: colour, sexiness and tags.

The brighter the colours (ideally yellows and pinks), the more popular the picture is going to be with viewers. Therefore avoid blue and green tones in the foreground.

Perhaps unsurprisingly the same goes for sex. The algorithm used is able to analyze images on content as well as context and found that shots featuring underwear, miniskirts and bikinis had the most "positive impact."

And last and most obviously, when posting to social media sites, the more tags accompanying the image, the better chance it has of being discovered and viewed.

Khosla's research follows that of Georgia Institute of Technology and Yahoo Labs researchers. Previewed at the beginning of April and officially presented this weekend, the team, led by Georgia Tech College of Computing Ph.D. student Saeideh Bakhshi, used facial recognition software to analyze 1.1 million images posted to Instagram to try and understand which types of image generated the biggest positive response.

The answer is any image containing a human face is 38 per cent more likely than any other visual subject matter to be liked and 32 per cent more likely to attract comments.

The study also found that it doesn't matter how many faces are in the shot, who the face belongs to, or whether the subject or subjects are male or female.

As for Khosla, his next step is to develop a tool that will be able to automatically modify a photo in order to boost its popularity -- an area in which he and CSAIL already have expertise. In 2013, Khosla and three fellow students at the university's lab developed a tool that automatically modifies headshot photos to make them more memorable.