What is the recommended approach to storing thumbnail images using MongoDB? (Note: the images are only thumbnail images, the actual larger images are not necessary) Can I store it in bytes within the document? Or should I use GridFS? The thumbimage is actually a small icon and is always return as part of the complete document when queried.
What is the recommended approach to storing thumbnail images using MongoDB? (Note: the images
Share
Storing per document would probably be the optimal method here since gridfs would allocate unneeded space and extents to accomodate the standard 256k ( as stated here: http://www.mongodb.org/display/DOCS/GridFS+Specification ) size of each chunk within the
fs.chunkscollection.Also as you state these are thumbnails as such you would probably want to use them with the main document and so it seems only natural that it would be more efficient, not only your programming but also your database usage, to return this image with its main document.