added image resizing for gallery imgs