Optimized code and instagram photo preview