update image gallery layout