rewrite ImageGallery