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

Work with images which are not a 1:1 aspect ratio
 
blessingscm
Jr. Member
 
Total Posts:  8
Joined:  2007-12-12
 

I haven’t been able to find any posts regarding improving the way images which are not square are handled with the default template.

Images on the category page are squished or stretched into a square box which looks horrible. However the same image looks just fine when displayed in the my cart side bar.  On the shopping cart page itself, the small image is used but is stretched to 75px wide rather than the suggested 50px so though the aspect ratio is maintained, the quality is poor (size recommendations for images is used based on this wiki article).

Finally, the product page itself uses a zoom feature, however images which are not square cannot actually have the full, large image displayed… rather you have to scroll around the image even when zoomed out as far as possible.

The image handling here seems fine for images which are square with the exception of the shopping cart which seems to need some tweaking to keep the image quality improved, but the handling for non-square images is poor.

Is this handling something I need to work on improving via a new layout/template?  Has anyone worked on this yet?  What are my options for improving this handling… it doesn’t seem practical to force users to only use square images.

Thoughts? Comments?  Corrections?  If you’d like to see examples of what I’m experiencing I have a test site I’m playing with (at least for the moment) here: http://www.bcmc2c.com/store/.

The “Test” product has been created with a square image and the “Test 2” product has a non-square aspect ratio.

 
Magento Community Magento Community
Magento Community
Magento Community
 
menschie
Jr. Member
 
Avatar
Total Posts:  3
Joined:  2007-11-27
 

As this is my first post I really want to be careful not to come off ONLY negative so I’ll start off by saying how incredibly promising Magento is! Beautiful gui, well thought out, clean code… I’m really impressed!

I really agree with the post above. The image handling at this point is just an afterthought, putting all the onus on the administrator of the store with the code doing none of the work to make the process quick, fool proof, and painless. I think of the photo gallery app, Coppermine, which automatically creates new resized images set to the prescribed jpeg quality upon upload or addition into the gallery. Just having to upload 1 image for each product and maybe just having a file size cap to protect disc space is ideal if not outright necessary. Magento should take it from there and do the rest. Expecting layperson store admins to make a few different resized images in a 3rd party program and have them done right just isn’t feasible.

 
Magento Community Magento Community
Magento Community
Magento Community
 
buffalokill
Jr. Member
 
Avatar
Total Posts:  15
Joined:  2007-12-12
Coeur d'Alene, Idaho
 

As magento appears to be built correctly from the foundation up, I believe that they’ll improve the image handling. I think they’re more focused on nailing down the big bumps first, and these bells and whistles will come in due time.

My suggestions to the awesome team behind the image handling task:

A default image that is the only one required.

Uploading to the default image alone, would recreate the image sizes for the small and large as we would specify in a Image Config section.

So, if there were a Image Handling Config Section, we could choose the max width and height for small, default, and large images. So upon uploading, it would scale each accordingly.

The small and large upload fields would remain, in case the shop owner wanted a different image for either.

I would also suggest the usage of Lightbox or one of its variants, for the popup.

Keep up the great work guys! I look forward to more awesomenessity from the team.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Loic_LC
Sr. Member
 
Avatar
Total Posts:  194
Joined:  2007-12-19
Paris, France
 

I agree with previous statements, and I would suggest a multiple images layout handeler, and/or
an hover script

Great great work anyway.

 
Magento Community Magento Community
Magento Community
Magento Community
 
double02
Jr. Member
 
Avatar
Total Posts:  28
Joined:  2007-12-08
Los Angeles, CA
 
schlafen - 12 December 2007 01:50 PM

Images on the category page are squished or stretched into a square box which looks horrible.

To use different dimensions or to remove the constraints look at app/design/frontend/default/default/template/catalog/product/list.phtml.

If you remove the width and height attributes you have to be careful to only upload appropriately sized photos. Otherwise, your lists will look funny.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Baybee
Member
 
Total Posts:  61
Joined:  2008-01-22
 

Isnt there a way to set either the width or height and the other would constrain to the aspect of the one set?  Then that way, images would all be the same height or width. 

Also, I’ve found that using the same image for all 3 product images just saves the images as filename.jpg then filename_1.jpg and filename_2.jpg which really is a waste of space since they are the same exact image.  Is there a way to prevent the image from renaming itself and just be called from the main image that was uploaded?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Lior
Magento Team
 
Avatar
Total Posts:  293
Joined:  2007-09-24
 

At the current version there is not option to control the image sizes, they are hard coded.
It is on our list to have product images sizes controlled via configuration in the admin
We are also thinking about having an option for the images to be resized in the admin during image upload.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Baybee
Member
 
Total Posts:  61
Joined:  2008-01-22
 

Thanks for that!

What about the fact that the fact that the file, even if it’s the same file, is uploaded and renamed several times?  Is there a way to prevent that other than having to make 3 images for uploading?

Thanks!

smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
Lior
Magento Team
 
Avatar
Total Posts:  293
Joined:  2007-09-24
 

There is not way around it in the moment.
It is possible that there will be changes to it later on, or something will be contribute by the community

 
Magento Community Magento Community
Magento Community
Magento Community
 
Baybee
Member
 
Total Posts:  61
Joined:  2008-01-22
 

Thanks again! smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
Spek
Sr. Member
 
Total Posts:  77
Joined:  2007-11-28
 

There’s no way you can make auto-resized images look good if you hardcode the size. Dimensions will always be screwed up

The only way to do this is to resize them according to the dimensions (example function here: http://www.magentocommerce.com/boards/viewthread/5502/), then get the image size of each thumbnail and enter those in the image tag.

I’ve been using something similar here:
http://www.fotodali.be/producten/gsm/

If you check the source, you’ll see that each image has a different size, but my upper limit is set to 82 so no thumbnail is bigger in width or height.

 
Magento Community Magento Community
Magento Community
Magento Community
 
cliffdangler
Jr. Member
 
Total Posts:  2
Joined:  2008-06-30
Johannesburg
 

To avoid the stretched category images, do this:

1) Open “magentofolder\app\design\frontend\default\default\template\catalog\category\view.phtml”
2) Delete all instances of: width="475"

 
Magento Community Magento Community
Magento Community
Magento Community
 
zeevik03
Jr. Member
 
Total Posts:  1
Joined:  2009-04-14
 

Hi.

So is there any news for the thumbnail size? Can we now change it at all?

 
Magento Community Magento Community
Magento Community
Magento Community
 
demonkoryu
Guru
 
Avatar
Total Posts:  328
Joined:  2008-11-26
Dortmund, Germany
 

Yep. Get DirectResize and change the templates.

 
Magento Community Magento Community
Magento Community
Magento Community
 
tastymouse
Member
 
Total Posts:  43
Joined:  2010-04-28
Amsterdam, The Netherlands
 
Lior - 24 January 2008 10:16 AM

At the current version there is not option to control the image sizes, they are hard coded.
It is on our list to have product images sizes controlled via configuration in the admin
We are also thinking about having an option for the images to be resized in the admin during image upload.

Whatever happened to this idea? In 1.4.1.0 image resizing is still very limited.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Elver Loho
Jr. Member
 
Total Posts:  2
Joined:  2010-10-05
 

I, too, would like to know when this will be fixed or augmented in some way.

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