Don't resize small images

If an image's dimensions stay under the maximum dimensions, use the original image instead of a resized one.