Magento 2: is there any way to assign product image from remote image url programmatically?

by Camit1dk   Last Updated April 16, 2018 12:09 PM

I just want to assign product image from remote image url.

One more thing is i can't able to download image in my server because total size of image is : over 1TB

my code is below :

$imageUrl = 'Product image remote url';

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

using this code i getting "The image does not exist." error.

Answers 1

Related Questions

Magento Product image on Hover not working

Updated March 06, 2017 08:09 AM

Images missing on front-end

Updated April 13, 2017 19:09 PM

How to change sort order of image gallery in Magento 2?

Updated November 20, 2018 15:09 PM