Storing images: filesystem or database?

For a while i’ve been storing image in my PHP apps in the filesystem,
but with the potential for a Rails project coming up i thought it was
time for a review :0)

In everyone’s experience, is it best to store uploaded images in the db
or just stick them on the filesystem with a reference in the db?

I’ve seen various performance tests and security arguments for and
against each method so it’s difficult to know what’s best.

Does anyone know which method Flickr use? I’m assuming whatever they’re
doing would be a good place to start :0)



Check the message archives for the pros vs. cons on this using Rails -
it comes up for discussion here every few weeks, and you might find
that everything has already been said that you’ll be interested in.


Dave M.

Probably should have done that before posting :0)



I think…its always better to store images in file system…if the
can be large and can have several versions…

last argument is…because suppose you use RMagick to modify the image
store it under some other name/dir… for all these cases file system

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs