LPS-32036 Generate legacy image gallery thumbnails on the fly