Redefined the way photo galleries get the original image dimensions