Auto-generate thumbnail in equivalent location (unless one has been manually created)


/ Published in: PHP
Save to your folder(s)

Not particularly novel, but quite clean. Allows you to put images in any location on the server and saves having to generate thumbnails at upload time.

The URL to this file should be:

`//`

Valid request types:

* `view` — View the image full-size (don't scale)
* `preview` — View the image at a medium scale
* `thumb` — Show a thumbnail of the image

Images can be JPEGs or PNGs. Broken URLs redirect to a designated 404 image.

Thumbnails and previews will be stored using an identical folder hierarchy inside the `thumbnails` and `previews` folders inside the images folder.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.