Added checking for image resizing that we don't unnecessarily resize images