Wrap photo_dimensions in rescue-block