Loading product photos of different sizes
- Started
- Last post
- 7 Responses
- adev
I have a client I do work for that has an e-commerce site where they upload their own product photos. The problem is, the photos are not always the same size for the same types of products, so displaying them effectively has always been an issue, except when I did it since I knew what sizes I always wanted. I've trained people in the past, but due to marketing people and others in the company and their desires to rush things done, the people doing it now don't have the same commitment to uniform image sizes, even their part-time on staff web guy. (I'm talking like 10-50 pixels here or there, not one product is 100x100 and another is 800x600).
Due to the nature of some of their products, they can upload hundreds of photos on a single day, so they do it via FTP, not a page uploader where the server could resize the photos upon upload.
I'm looking for ways where I can take these non-standard photo sizes and display them nicely. This is really only for the catalog pages where I need to show 20-30 products at a time. The actually display pages are able to handle the size differences already since its just one image.
Any suggestions?
Right now, I'm thinking of creating a small flash file that takes a filename input and displays the photo, resizing it proportionally. But I'm a little worried about loading 20+ SWFs at once, since I'm not dealing with web users who usually have the latest in computing power.
- acescence0
you could pick one critical dimension and just give your image tag that dimension and leave out the other. you can then at least force a width and maintain proper ration.
or... you could have a cron job that runs and finds new directories/images and resizes them.
- mikotondria30
use some php to resize and rescale it on the front-end..
http://pastie.org/638481
- dropdown0
one of many Jquery methods:
- acescence0
if the sizes aren't varying too far beyond the ideal then do it on the front end, but if you have huge images that you're displaying as thumbnails, you're wasting tons of resources pushing those out and should resize on the back end
- adev0
No, they're not that far off, just enough to make making a nice organized grid a PITA without having a lot of white space around the products to handle the differences
- adev0
Dropdown, that Jquery one will work great. Thanks!