For every couple of products that one of our customers adds to their site one of them will upload with a single incorrect image. The image source file has the same dimensions as the two products next to it in the photo below, but when uploaded, Magento is adding a white border on that particular one. We are running magento 2.3.2.
Hello @DTF Digital
You can try following code for resize the product images in magento 2.
First of all, you need to call helper file. Magento\Catalog\Helper\Image to resize product image.
$_product = $productObject; // Your Product Object
Thanks for your reply, unfortunately resizing the image isn't the problem, it's just the odd image that's scaled incorrectly, for a so far unknown reason.