View Single Post
  #5  
Old 11-30-2008, 08:36 AM
 
Pop Electronics Pop Electronics is offline
 

Senior Member
  
Join Date: Oct 2006
Posts: 131
 

Default Re: Resize thumbnails with GD

The way I use my shop is upload just 1 image for every product, the large image (this is besides detailed images, just on the add product page). I always use the top image, leave the 2nd image blank.

What X-Cart does is resize the images you have uploaded in the browser to the width you entered in the options (for my shop it's 145 pixels wide, however most pictures I upload are around 300-400 pixels wide).

What this mod does is resize the image through the GD library on the server and save it into the filesystem, so it doesn't need to resize the picture every single time (just like the template cache you have).
This will save bandwidth, time (because you don't have to resize yourself and upload 2 images) or when you don't upload 2 pictures like me it saves a lot of frustration because of ugly looking browser scaled images.
It saves bandwidth because the browser normally receives the full image (20kb or so) and resizes them according to your specifications. This script resizes them by using the GD library so they still look nice and sharp, then it saves it so you only have a 2-5kb download for each image.

I actually never uploaded images myself, besides doing so through the admin page in the thumbnail entry.

This is how I upload all of my pictures:

http://www.popelectronics.nl/img/screen.jpg

This also works for large images:

http://www.popelectronics.nl/img/screen2.jpg

I never use any other option and never upload more than 1 image. With the mod they all look nice, wherever you put them in your shop.

Have a look at www.popelectronics.nl so you can see for yourself.
__________________
X-Cart 4.7.7
Fashion Walk template
CDSEO pro, remember anoymous carts, checkout one and some mods I've done myself (ideal, froogle, export shipping labels)
@Linux php5.6, mysql5.6, dedicated server
iDeal Advanced v3.3.1 integration
Reply With Quote