PHP, manipulating images and thumbnails?
Posted
by learner.php
on Stack Overflow
See other posts from Stack Overflow
or by learner.php
Published on 2010-05-24T09:17:40Z
Indexed on
2010/05/24
9:21 UTC
Read the original article
Hit count: 234
I am using php and mysql. I allow my registered users to upload photos, the photos are store in filesystem format, then I will keep the original/max size of : width: 1600px and heigh: 1200px. In the user profile page, I would like to display the image, it maybe one of the 5 types of thumnails: 500x500, 300x300, 200x200, 100x100 or 50x50. What is the best way to create the thumbnails, here are my current solutions:
I am thinking of create 1 thumbnail, then from that thumbnail, i will resize in [img src="" width="XX"] tag, alternatively, store the different thumbnails size in database, then get and display it
Create 5 thumbnails for each photos? (I am afraid this is a bad way)
Whats the best practices?
© Stack Overflow or respective owner