Question

I've done A Horrible Thing and bulk resized all images less that 500px up to a minimum of 500px by doing this:

find -type d \( -path ./cache -o -path ./placeholder \) -prune -o  -type f -regextype posix-egrep -iregex '.*\.(jpg|gif|tif)$' -exec identify {} \; | awk '{ split($3, wh, /x/); } wh[1] < 500 && wh[2] < 500 { print $1; }'  | while read i; do convert $i -resize 500 -quality 90 $i ; done

I've then deleted the 100x100 resized images with:

find ./ -name "resized*" -exec rm {} \;

That worked perfectly on the filesystem. I delete the Magento image cache (confirmed at filesystem level)

Unfortunately when I try running M2EPro to revise the eBay listings, it receives an error back that the image is < 500px.

If I take the raw image and re-save it using the Magento Admin it will be accepted and revised correctly without error.

My question is does Magento somehow store or cache the image dimensions somewhere on upload? How can I flush or get Magento to recalculate this for all images?

Was it helpful?

Solution

I've realised it's due to eBay caching the image URL with my 30 day expire Cache-Control from NGinx.

OTHER TIPS

Magento never does that thing.

It just keep the product images inside media/catalog/product/ directory, whenever the image is shown on frontend with resized by using catalog/image helper class method resize($width,$height), the product image is resized and cached into media/catalog/product/cache.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top