Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Resizing images on upload to reduce loading times
 
foomin
Jr. Member
 
Total Posts:  26
Joined:  2009-01-26
 

I really like that Magento has the ability to proportionately resize images for the catalog and also the listings but our client is uploading particularly large images which are taking forever to load. I refer to the mini-category images on the front page: http://paradiseroad.seriousgroup.co.uk

You’ll notice the central image (the heart) takes forever to load because it’s actually huge but just resized in width and height. What I’d like is for Magento to actually reduce the image to the correct proportions and not just apply a new width and height to the img tag. Is there a way of changing the image scale upon upload?

Any help or ideas greatly appreciated, thanks.

Michael

 
Magento Community Magento Community
Magento Community
Magento Community
 
Discovery
Enthusiast
 
Total Posts:  767
Joined:  2007-12-29
 

Pretty site. Page load times are not bad either.

You need imagemagick. It has an imginfo command that you can use to find the biggies. Then you can resize them on the command line, resharpening them if you need to. I don’t have any scripts to hand :-(

 
Magento Community Magento Community
Magento Community
Magento Community
 
foomin
Jr. Member
 
Total Posts:  26
Joined:  2009-01-26
 

We have imagemagick installed by default but I need to know how to actually hook it up to Magento to make it work, as I am unsure of what I’m doing when it comes to that .

 
Magento Community Magento Community
Magento Community
Magento Community
 
jbova
Member
 
Avatar
Total Posts:  42
Joined:  2008-07-17
New Ringgold, PA, USA
 

I don’t like when someone replies to a post by uselessly stating you shouldn’t be trying to do that, but hear me out.

I was in the same situation with a client, and I recently wrote a perl script that I ran from the command line to find any images in the Magento catalog with a dimension, width or height, greater than 800 pixels and resize them in place. I have the code if you would like. You can even set it up in a cron job to do this automatically every day.

Anyway, I found this post because I thought I would need the same feature that you are requesting. Then I realized, it isn’t an ideal solution to resize the images on upload. It as a waste of resources, most notably, time and bandwidth.

It takes about 85 times longer to upload a 3MB ( > 2000px ) image compared to a 35K ( 800px ) image. Our client’s employees were wasting this much time adding product photos. If the client can be trained to resize the photos locally, then their data entry team will be substantially more efficient. Trust me, it takes a long time to upload just 5 product photos at over 3MB each.

There are tools available for Windows, Linux, and Mac that allow you to batch resize an entire folder of images at once. You may help your client and yourself to create a more efficient e-commerce business by instructing them on how to use these tools effectively.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top