patches image gallery correct file id for original image link