Im working on a project, where I'd like to store photographs in a secured location for copyright reasons. Users can upload their photographs to a folder, outside the public route ('www').
For signed-in users, I'd like to allow to browse these photographs. I wanted to use 'imagecreatefromjpeg' and 'imagejpeg', but they could only fill the entire webpage. That would only be good, if I would want to open the images into a pop-up window. Instead of doing that, I'd like to have small thumbnails (generated on upload, also stored in private folders) all over my screen.
Is there any way to do that? Am I going in the worng direction with this?
Thanks for helping me out.Answer1:
You can cache thumbnails of the submitted images with php gd
<a href="http://www.fliquidstudios.com/2009/05/07/resizing-images-in-php-with-gd-and-imagick/" rel="nofollow">http://www.fliquidstudios.com/2009/05/07/resizing-images-in-php-with-gd-and-imagick/</a>
Then create a image.php file that will serve images (put in your own authentication to secure access) that will end with
Then in your html, just put something like:
<img src="images/image.php?id=123" width="100" height="100">