Aditya Khosla, a PhD candidate at The Massachusetts Institute of Technology (MIT)'s Computer Science and Artificial Intelligence Lab, analysed 2.3 million Flickr photos to isolate the factors that make a photo popular.
According to Khosla, his algorithm allows him to predict how many views your photo will get on a photo sharing website before you even upload it.
The algorithm takes into consideration social factors such as how many followers a user has, the number of tags on the photo, and the length of the title, 'The Verge' reported.
The algorithm measures the potential popularity on a relative scale from one to 10, the report said.
Khosla also plans to create a tool that can automatically edit a photo to make it more popular.