mysql - which is better saving images in folders with paperclip or using database to save images -


i have question in mind, preferable keep images in database directly using datatypes blob,binary etc. or way paperclip stores images maintaining folder structure , keeping path in database standard one.

storing pictures in database helps keeping data synchronized (what if chance folder name changed manually?). save small effort remember data outside database itself. on other side retrieving image database slower doing file system, , database storage space seem remember more expensive on web server.

said that, it's matter of choice. in case decide go database, there gem helping 'paperclip_database'.