In most cases, I would use ImageMagik so that I could have a regular version and a thumbnail version of each image.
This will let you actually create a thumbnail size. I used it and it works well. I coded my script quite sometime ago, so I can’t easily help with the details. But, they are there. When a new picture is uploaded to my site the thumbnail is created automatically.
Hope this helps.
I’ve got a script to do the resizing. Thanks for the resource though. I guess I was just commenting on this article. I see the usefulness of the PHP function within a script that creates a resized image but just don’t see how it’s useful without saving a resized image.
In the past, I’ve utilised mod_rewrite invoke the thumbnail creation process. Given /images/thumbnails/coffee-bean.jpg, if this was to result in a 404, the script would be invoked to create the thumbnail and display it.
So you would code the 404 to look for an image extension in the requested path? I don’t understand how you would distinguish between a 404 from the image path and a 404 from a truly non-existent page. Additionally, how were you passing where the image was actually located so the thumbnail could be generated?
If you can’t find the .htaccess don’t worry. I think I understand where you’re coming from. That seems a bit overly complicated for this application but I like the idea. I’ll have to keep it in mind for future projects.