[photos] Fix evaluating imageSize.