Check that an image is not too long.