Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Keeping Aspect Ratio on Thumbnail Images


mystifier_uk

Recommended Posts

Basically I have several products on my online shop but the different images are of various sizes and aspect ratios for example:

 

250x350

200x550

300x200

 

So when these differently sized images are put into thumbnail form some of them look skewed!

 

Is there a way to keep the aspect ratio of the thumbnails within the preset thumbnail dimensions (i.e. 100x80) so they display properly?

Link to comment
Share on other sites

Basically I have several products on my online shop but the different images are of various sizes and aspect ratios for example:

 

250x350

200x550

300x200

 

So when these differently sized images are put into thumbnail form some of them look skewed!

 

Is there a way to keep the aspect ratio of the thumbnails within the preset thumbnail dimensions (i.e. 100x80) so they display properly?

Pick whichever dimension is most important for your layout and only define that one. Leave the other as 0 or blank. Are you using a thumbnail contrib?

Link to comment
Share on other sites

Thanks Rich - that worked a treat! :thumbsup:

 

I'm not using a Thumbnail Contribution, and at the moment my thumbnails look really rubbish!

 

Is there a decent contribution you could recommend that re-sizes the thumbnails properly so that they don't look squashed?

Link to comment
Share on other sites

Dont quite understand your question. Anyway there's three options here (just my suggestion):

 

1. do not use the default ratio 100:80, but then all your images wil show on the pages with their (different) original ratio/size;

 

2. use the default ratio 100:80, and make all your images according to that ratio;

 

3. change the default ratio to a value to your choice so that most of your images will fit into that ratio, and you subsequently make all your images according to that ratio.

 

And finally, you know how this thing works, and you devise something that fit into your situation.

 

Ken

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

Dont quite understand your question. Anyway there's three options here (just my suggestion):

 

1. do not use the default ratio 100:80, but then all your images wil show on the pages with their (different) original ratio/size;

 

2. use the default ratio 100:80, and make all your images according to that ratio;

 

3. change the default ratio to a value to your choice so that most of your images will fit into that ratio, and you subsequently make all your images according to that ratio.

 

And finally, you know how this thing works, and you devise something that fit into your situation.

 

Ken

I use image magic at the moment. There have been a few minor problems that I have now fixed and it's all working now. I found most of the answers in the support thread.

 

There are other options that seem to do the same job. I have been meaning to try the others. I don't know why I haven't yet as you can always just make a complete backup then install anything to try it out . If you want to try something next just revert to the backup.

 

My advice would be to backup your site completely and try all the contribs that sound like what you need. Some have more options such as image magic but it's a lot of extra code to add to your store. You might also experience problems with some rather than others due to your setup and how much you have hacked osc.

Link to comment
Share on other sites

Thanks Rich - that worked a treat! :thumbsup:

 

I'm not using a Thumbnail Contribution, and at the moment my thumbnails look really rubbish!

 

Is there a decent contribution you could recommend that re-sizes the thumbnails properly so that they don't look squashed?

I've always used the on-the-fly image thumbnailer, and it was a snap to install and worked great... Also, the question of aspect ratios isn't nearly as important as the load times for those images... Even if you fix the aspect ratios, if you're not using an image thumbnailer, your site is forcing down the entire image file, and depending on your customers' connections and what size images you're using, this can kill the speed at which they load each of your pages... If you fix the aspect ratio, it'll just take that entire image and crunch it down to a display size of that ratio, but still download the entire full-sized image to their machine, so make sure you do install one of the thumbnail contributions :)

 

Richard.

Richard Lindsey

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...