Which is the best way to manage Photos on a web application?
I am building a Photo centric website. I wanna learn how to store photos on disk as well as database. diff sized thumb nails.. etc. Can som开发者_C百科e one guide me with the same ?
Look at imagemagick. Oh - And you shouldn't store images in a database. Use a file on disk, possibly with a name generated from an id in the database.
I found this to work for me
The best way to Organise photos for a web app is
- Either Store the File names Seo friendly or use a UUID
- store the original photos at one place just incase u plan to change the layout and need to resize them to different sizes
- Make seperate folders for differnt image sizes like 200x400, 150x150 or xlarge, large, medium, small etc.
- store the respective images with the filename u chose from step 1 as it is. no need of renaming it.
- referencing is much easier. all you have do is. refernce a file and make sure its from the correct folder.
Thanks Santosh for helping me out.
精彩评论