In case the image we cropped did not have an extension, the cropping did not work => added logic to add/replace the extension based on image metadata