cancel
Showing results for 
Search instead for 
Did you mean: 

Where to place product images for import of products?

Where to place product images for import of products?

Magento 2.2

 

I want to programmatically import products in my magento (fresh install). but unsure where I should plave the images...

 

This I have tried

\media\import\ -< folder not found, I used it on magento 1.9.3.7

\pub\media\import\ found the folder and placed the image there, but get exception

\test_import\ -> created a folder in magento root and placed the images there, exception there too

 

This is my php code

 $product->addImageToMediaGallery("/test_import/import.jpg", array('image','thumbnail','small_image'), false); 

 

Fatal error: Uncaught Magento\Framework\Exception\LocalizedException:

Any ideas?

1 REPLY 1

Re: Where to place product images for import of products?