EntropySink

Technical & Scientific => Programming => Topic started by: ober on May 03, 2015, 10:27:49 PM

Title: Product Image Management
Post by: ober on May 03, 2015, 10:27:49 PM
So one of my clients current sells products and he only has 1 image per product but he wants to add additional images.  He was originally trying to worry about thumbnails and stuff but I don't think that is necessary.  My current plan is as follows:

1) He uploads full size images
2) Product page loads as-is like it is done today with the one image.
3) AJAX call runs after the page loads that pulls in the other images in a little slider/lightbox (full size images that are just sized using width/height).
4) Clicking/hovering on one of those images swaps it out for the main image.

Is that how it's done on other sites (Amazon, etc?).  Or is there a better way?
Title: Re: Product Image Management
Post by: hans on May 04, 2015, 12:01:40 PM
Depending on how large the images are, I'd do the thumbnail thing. You could have the rendering service take height/width arguments and have it resize the images (and probably cache them) before sending them to the client. You could do the resize on upload, but having a rendering service would allow you to change the sizes without having to resize all of them at once.
Title: Re: Product Image Management
Post by: ober on May 04, 2015, 05:10:32 PM
The base images are only 600x400 and like 70kb if I remember. And I would have the resize done on upload since that part will be in place shortly.

I just wonder what the advantage of the thumbnail is?  You have to load the full image at some point so wouldn't it make sense to just use the full image with modified height and width in the light box?  Or would you just cache/dynamically load them on hover?