image gallery and main image preservation