Image Storage

11 years ago
Hi,

I've just installed and started checking out nopcommerce, would I right in saying that images are stored in the DB and not on the file system?

Thanks
11 years ago
Yes.

They are stored in the database, but then cached to disk at runtime. So the first time image is requested, it is saved from db to disk. All subsequent requests will retrieve image from file system.

Hope this helps.
Ben
11 years ago
Is it the orginal file that is upload that's stored or is it made smaller first?

I ask becuase MS SQL Server DB hosting isn't cheap and trying to keep the size of the DB would be a prioity for me and I'm sure others. Maybe something for future would be to keep them in the file system anyway to keep DB size down.
11 years ago
It is the original image that is stored in the db. In administration > configuration > global settings > media tab - you can set the "Maximum Image Size" for image uploads. Just make sure this is greater that the maximum size that you want to use for the other images (e.g. thumbnails etc.).

Storing the images in the database does offer greater portability, but we have created a work item to make this configurable.
Thanks,
Ben