fix gallery display for uploads that only have JPG