resize image and gallery change