Compress image and create thumbnail script
Posted: Sun Mar 09, 2008 8:28 am
Hey guys im making a site for my project, and basically it has a facility to upload images of new products. At present it simple uploads the original image and displays it throughout the site. Which is inefficient as where there alot of images loading u may have a few mb loading. Also when i show a thumbnail of the image its still the original size and loads a smaller version of the original image. What im looking to achieve is
1. When the image is uploaded, create a thumbnail of the image reduced in filesize and dimensions
eg i upload an image of 1mb 1024x768 the following happens
- create a thumbnail 100x100px 50kb in size
Is there a simple way to do this in php the only methods ive found via google just reduce the dimensions of the image and not the filesize also.
Ay help thoroughly appreciated
Thanks
R
1. When the image is uploaded, create a thumbnail of the image reduced in filesize and dimensions
eg i upload an image of 1mb 1024x768 the following happens
- create a thumbnail 100x100px 50kb in size
Is there a simple way to do this in php the only methods ive found via google just reduce the dimensions of the image and not the filesize also.
Ay help thoroughly appreciated
Thanks
R