cancel
Showing results for 
Search instead for 
Did you mean: 

How to fix image upload error when import images?

How to fix image upload error when import images?

Fatal error: Uncaught Magento\Framework\Exception\ValidatorException: Path "/pub/media/1_671.png" cannot be used with directory "/home/mypro/public_html/pub/media/" in /home/mypro/public_html/vendor/magento/framework/Filesystem/Directory/PathValidator.php:63


We already place the Magento 1 image folder into the /pub/media/import folder.

$product->addImageToMediaGallery($image, array('image', 'small_image', 'thumbnail'), false, false);


We import product image time display above error.

Please share if you have any idea.

Thanks.