MAGMI – Image import

I’ve been using the mighty MAGMI to speed up importing a Magento catalog that has a lot of configurable products and MAGMI has been doing a great job of it. Just run into one issue though with respect to the images. MAGMI has an Image attributes processor option in the Itemprocessors section at the bottom;

magmi-image-processor

This lets you rename images, overwrite images, pull in remote images, add them as ‘Extra Product Images’, determine whether they are the Base, Small or Thumbnail, exclude them….

http://sourceforge.net/apps/mediawiki/magmi/index.php?title=Image_attributes_processor

…however it doesn’t actually appear to let you resize them (unless I’m doing something wrong – answers on a postcard).

So after my massive import I realise that the client has given me all the images at massive full resolution sizes, way too big for use in an e-commerce store. What to do? Well there’s no way I’m going back and asking him to resize them all, I have installed ImageMagick on the development VPS it’s running on (CentOS5);

yum install ImageMagick

And then I’ve used this blog (http://sangpo.wordpress.com/2009/01/24/recursive-batch-image-resizing-in-linux/) to recursively resize and optimise the whole catalog using the following command;

find ./ -name "*.jpg" -exec mogrify -quality 70% -resize 800 {} \;

Be warned, it’s pretty resource intensive, I’ve written this blog post in the time it’s taken to perform this task. Happy days though, al seems to have worked well. Make sure you flush the image cache afterwards.