pictures stored in databse vs filesystem

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
This is probably a silly question having just read this thread, but is it possible in any way to switch from storing images in the database to the filesystem AFTER you have started putting products in (using 1.80) ?

I have no skills yet in using VS with ASP.NET so if there are programmatic ways of doing this please keep any answers as simple as possible please :)

I don't mind taking a backup of the database and playing around in SQL management studio if that's the only way :D

Thanks for any help in advance!
13 years ago
you can't do this out of the box at the moment - the only way will be programmatically but this feature has already been introduced to the forthcoming v1.9

I guess what that means is that you can choose (DO NOT USE the code from earlier in this post ) which way you store the images just now and in a couple of months when the official release comes out you will be able to switch

- hayden
13 years ago
Thanks Haydie :D
13 years ago
will it be possible to have pictures organized in folders on v 1.9?
I would like to have a folder for each category (reproducing the category tree on the file system) and images of products be in the folder of their category.
it should be a better way to manage pictures.
13 years ago
Yes.  I use this on my system.  I have a imagemanager class that allows me to choose whether to upload the image to the db or in file.  If I choose the later then the imagemanager will place the image in a folder system based on the name of the image.  Example:

northface-yellow-jacket.jpg would be stored in folder ...images/n/o/

You could configure this to do whatever you want and if the folder doesn't exist it will create it automatically.  Works really good.

I would post my code but it may be superfluous depending on what they do in 1.9.  If what they do does not work like this then I will post it.
12 years ago
joebloe wrote:
Yes.  I use this on my system.  I have a imagemanager class that allows me to choose whether to upload the image to the db or in file.  If I choose the later then the imagemanager will place the image in a folder system based on the name of the image.  Example:

northface-yellow-jacket.jpg would be stored in folder ...images/n/o/

You could configure this to do whatever you want and if the folder doesn't exist it will create it automatically.  Works really good.

I would post my code but it may be superfluous depending on what they do in 1.9.  If what they do does not work like this then I will post it.


In 1.9 when i am copying product using file system, it produces error.
please post your code here.
12 years ago
Hi all,

I have a question concerning Picture binary in the dbo.picture table, I have recently downloaded and installed NopCom 2.3 webshop template.

The company I am setting up for has over 6000 products with all images and variant images. I don't want to store the images directly on the database but on the file system as I know it will be to much data. I made all nesecary changes in the admin area. But on the front end there was no image available. I mapped out the table too. products to pictures etc.

I am using Microsoft Sql 2008 R2. Testing manually imputing data into the table. I am running into an issue when trying to upload the image directly into the database to view on the website, with other commerce products I have tested all I needed was to type the file path directly into the backend database collum away it went.. I have read the thread and humbly think you guy's could help.

What I have been asked to do is map out the tables from the webshop template,

1. Add the category, sub category and product. Which works fine. But the image won't appear..

To summerazie my question???

Is there a work around for picturebinary - I always end up with null and it doesn't view on the frontend (image not available). I'm not using SQL, I'm typing directly into the table and executing that way.

My image file is in the inetpub wwwroot file for nop commerce.

I am absolute novice to this and its the first ecommerce application i have ever set up... All help I would very great full and it would be humbly appreciated. I hope this makes sense.

Many thanks

Richard.. :)

PS. After testing various Ecommerce apps Nop is the system I want to use as it very powerfully and great functionality. Just can't get my head around the images in the backend and I have been pulling my hair out for the last 6 day's.
12 years ago
Did you enter the correct path(s) in the column Picture.SeoFilename?  Are your pictures stored in the folder ~\content\images?

Some other things to try:
1. Using Firebug or by viewing source see what the src value is of the picture you say isn't showing?
2. Try uploading a random picture to any location in your application and then try to display it on the home page by temporarily adding a img tag. e.g. <img src="../myfilelocation.jpg" alt="mypic" />.
3. Once you get a test image to display correctly, try one from a location stored in Picture.SeoFilename.  The key is to try ONLY ONE at a time.  

It sounds like your urls are probably not correct or formatted wrong.

Hope this helps.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.