Automatic thumbnail creation

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
leoden
Forum Newbie
Posts: 21
Joined: Sat May 24, 2003 8:48 pm

Automatic thumbnail creation

Post by leoden »

Hi there

My site currently has an online catalogue, by each description is a thumbnail which when clicked ( guess what! ) pops up a large version of the image. This system works absolutely fine. In order to make my thumbnail im simply doing a batch conversion on all my jpgs and reducing the main images by 25%. Then Main Images and thumbs are then put in separate directories and uploaded and displayed as required.

My query is this, Ive noticed in my PHP book that PHP has many image functions that could generate the thumbs for me dynamically from the main image therefore without the need for a directory of thumbnails. Before investigating this I was wondering about performance issues i.e would is be better for me to leave the system as is, or would there be a benefit from letting PHP generate the thumbs.

Thanks in advance
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

I'd leave it as it is. If you get PHP to do it then you'll just introduce extra overhead. i.e checking if a thumbnail exists, if not generate it and all this whilst the user waits for the page.

Most 'systems' that do this leave the thumbnailing to something 'external' like ImageMagicks convert as they are designed to do this sort of stuff ;)
leoden
Forum Newbie
Posts: 21
Joined: Sat May 24, 2003 8:48 pm

Post by leoden »

Thanks, Ill leave it then, I suppose I was just being picky!!
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Well that's just my opinion on it, i might be wrong and others might tell you PHP is better for doing it ;) I'd wait for more opinions first before deciding just in case i'm mad!
Post Reply