Update image thumbnails and gallery code