Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I want to do a list of thumbnails with images. But i don't want to resize all images and send to homepage.
Is there a PHP script that resize the image automatically? I don't want to use "" because it will need to load all the image.
thanks!

Be sure to properly modify your code when posting so it isn't processed. Make sure you view the post int he preview page before submitting.
Here is the code you posted:
[SCRIPT LANGUAGE="Javascript"]
if(GetCookie('computingnet_image') == 'yes') {
document.write('');
}
[/SCRIPT]Not sure I entirely understand your question. Are you wanting 1) the PHP code to display the images at thumbnail size or are you wanting 2) the PHP code to create the thumbnail images?
If you are wanting #1, that is a bad idea since it would take a long time to load the page.
So, if you are meaning #2 I would have to ask are these images that you are uploading or are they user submitted photos.
If you are uploading the photos there are many free desktop applications that can create the thumbnails for you very easily (MS provides the free ImageResizer for XP).
If the users are uploading the images then a PHP solution would make sense. In that case you would need to use some of the image functions in PHP: http://us2.php.net/gd
And/Or you could find a class someone has written to implement onto your site:
http://www.phpclasses.org/browse/package/1450.html
http://www.programmers-corner.com/sourcecode/254
Michael J

So you want: 2) the PHP code to create the thumbnail images?
Other than classes above, this is what I use often: phpThumb
It'll probably take some time to understand, but once you do you can do almost anything, to any images - from user uploads or from remote sites. You can resize, keep proportion, create thumb with zoom&crop, add dropshadows, etc...
Here's one site using it, when the administrator upload a new image, it'll resize it and create a thumb. The thumb is zoomcropped so it all looks the same without forcing the image heights/widths.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |