Generating Thumbnails

Hi, i have a page with about 30 images on, that i wish to display thumbnails for, and when clicked on, display the full images, i have the full images already on the server. Is there a way to generate thumbnails, without individually opening all the images in an image editor, resizing them, resaving them? Is there anyway of just generating them from the main image in the browser, and displaying the thumbnail, with a click on link to the main image?

applicable page is http://www.bathingwithtoasters.com/headliners (though it won’t be of any help i imagine)
I’m writing it in dreamweaver cs4 if it makes much difference

And the page’s source code is:
[php]<?php require "prehead.php"; ?>

<?php require "metadata.php"; ?> Headliners - Bathing With Toasters <?php include "1head.php"; ?>

Headliners

Daily Express
Guardian
Hello
Independent
Daily Mail
News of the World
Observer
Daily Star
The Sun
Sunday Mail
The Times
Westmorland Gazette
<?php include "1foot.php"; ?> [/php]

Thank you for any help :slight_smile:

Hi Epideme,

I highly recommend timthumb.php – it’s image-resize-crop php script. Very lightweigt and easy to use; it even compresses images so make your webpage load fast:

How it works?

Download and follow implementation instructions here: www.darrenhoyt.com/2008/04/02/timthumb-php-script-released/

To resize/compress an image,

< img src="/scripts/timthumb.php?src=/images/sample.jpg&h=150&w=150&zc=1" alt= “”/>

As you can see, there are 5 attributes namely:

src - your timthumb library
src - the image you wish to display
h - image height in px
w - image width in px
zc - 1 if you want to crop

Hope this helps…

Hi codeguru, thanks for that, with a bit of jiggery pokery it’s all working, beautifully, that was really painless and even a total novice like me could pick it up and the instructions were nice and clear. Thanks a lot. :slight_smile:

Sponsor our Newsletter | Privacy Policy | Terms of Service