Changed resize logic of image on image page