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

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

Hi @Loginname,

 

Can you check if you've followed all the steps?

https://docs.magento.com/m2/ce/user_guide/system/data-import-product-images.html

--
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"