image uploading/resizing best practices in PHP
| From: | Dwayne Heronimo | Date: | Thu, 22 Mar 2007 11:15:24 +0000 |
| Subject: | image uploading/resizing best practices in PHP | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-251077@lists.php.net to get a copy of this message | ||
Dear All,
I would like to make a script to upload a jpg filewith php to a server; then
make a thumb; save if for later use. And store the path to the image in a
database to display it later. But what is the best practice to do this on a
relatively low traffic website?
I dont know where to begin but I have 2 appoaches:
1. To make a script to upload the image and resize this on the fly and store
only the thumb image somewhere for later use. While also to store the image
path in de database for later retrieval.
2. to make a script to only upload the image as is and then insert the image
path in the database for later use. And upon displaying the image to use
like a nondistructive <img scr="resizer.php?imgfile=image.jpg&width=250"
border=0> resizer to display the image in the desired dimentions.
Which one would be the best practice now a days for a relative low traffic
site?
I really have no idean how to build this but I have a good approach I maybe
could start searching for something more specific.
Thanks for your help,
Dwayne