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 some one guide me with the same ?
+3
A:
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.
troelskn
2010-07-04 11:47:40
Good answer. Imagemagick is certainly the way to go. If your database is getting really huge think about your file organization on disk. You maybe want to store files in different directories, not all in one.
GorillaPatch
2010-07-04 12:53:45
:( i was asking about the organisation on the disk itself :(
Harsha M V
2010-07-05 19:31:57
Any suggestion on reading on how to organise photos on disk
Harsha M V
2010-07-15 04:57:53
I don't understand what you mean by "organise photos on disk". Stick them as files in a folder, and name them from an id in the database.
troelskn
2010-07-15 08:45:04
i was asking on the best way to oraganise the folders. since a single image will have 3-4 versions in different sizes.
Harsha M V
2010-09-25 10:13:08
A:
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.
Harsha M V
2010-10-06 07:56:35