Data Migration - Product Images

Hace 4 semanas
Hello! Im having issues getting products to populate with images during a new NOP instance setup.

Our first approach was to script the data:
We inserted all the products with no problem via SQL insert, then for each product image, we created a relational record in the product_picture_mapping table, and inserted a cooresponding picture record as well using file name in seoFilename. This approach did not work - it caused products to appear with a broken image icon as though file paths werent correct (despite being dumped into the images folder where other manually uploaded images were going).

Our second approach is attempting to use the import/export features. We removed all picture and picture mapping records so we just have our products inserted. I added one test image to a product manually. Next we export one product to excel, can observe the working image path. My understanding is you should be able to edit those paths using the excel import feature, or even add image paths that way - however we are unsuccessful. When we put a new image in the same containing folder and attempt to override the manually uploaded product image to the one dropped into the images folder, it creates a secondary image record that just says no image.

Any ideas on how to successfully configure this? Tips or tricks on how to do this the data script way, or how to utilize the image import tool?
Hace 4 semanas
joeobrien90 wrote:
... use the import/export features. ... we put a new image in the same containing folder

I don't recommend you use the same folder as in the exported Picture column value, because it's the thumbs folder.  Rather, create a new subfolder just above.  E.g. if your exported Picture1 is:
C:\web\admin-demo.nopcommerce.com\wwwroot\images\thumbs\0000020_build-your-own-computer.jpeg
Then create folder, e.g.,
C:\web\admin-demo.nopcommerce.com\wwwroot\images\import

After you Import, check the system log for any errors.

Where are you storing your images (media settings - Pictures are stored into..) - Database or File system?

RE: "creates a secondary image record that just says no image."
Which table?  Picture, PictureBinary, Product_Picture_Mapping?


Hace 4 semanas
Thank you so much, i think this may have been a combination of issues. I needed to open up permissions to the source images folder i dropped in, AND then when i did what you said - relocated out of Thumbs folder and tried again it seemed to work. Much appreciated.