fix the way shared imaged are displayed in the gallery