开发者

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

  1. Either Store the File names Seo friendly or use a UUID
  2. store the original photos at one place just incase u plan to change the layout and need to resize them to different sizes
  3. Make seperate folders for differnt image sizes like 200x400, 150x150 or xlarge, large, medium, small etc.
  4. store the respective images with the filename u chose from step 1 as it is. no need of renaming it.
  5. 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜