Make thumbnail fit into an imaginary square box

It’s all very well making the thumbnails all the same width, but if you ahve a tall picture, it looks out of place.



Look at the plastic tools picture, compared to the heat gun picture below it. It’s huge!

If they fitted into a fixed square box, then they would all look good.

By the way, I know the slow and manually intensive solution is to fix each and every picture with a graphics package, but really the cart could do this easily and save a lot of time.

The issue with that is, the image taking your example would be a waste of time as it would be nothing more than a line with no significance.

I personally wouldnt like to see this added, It would also add extra load as on each image load it would have to analyze the dimensions, perform a calculation of some kind and run through an if statement or two…

When images should be your priority as these are what ultimatly sell / describe your products, therefore labour intensive hours to get them right will have its own rewards

Of course it would be up to you to fix the extreme examples, like the one mentioned, but it would work for 90% of the images you’d use.

I used to use this technique with a mod on OSC, and it worked extremely well. It had a max width setting and a max height setting. CS_Cart acts as if the max height setting was blank. Either of them could be blank so it was flexible enough for me and you :slight_smile:

BTW, I thought the thumbnails were created when you uploaded them, not on every page load? Even if it doesn’t, then 12 "if"s would add an extremely small fraction of a second to a page load.

OK I sort of mis-took the question

Yes, when creating the initial thumbs this could help, I do think there needs to be more options with the thumbnail creatore, including a 3rd one for listing pages.

It would all need to be done prior to compiling the page, on the fly should not be an option, yes it would be a few ifs for one product… but a whole lot more for 30 products per page :wink: