Fix truncated display of images in the gallery