changes image gallery layout