$product->addImageToMediaGallery('ABSOLUTE_PATH','image',true,false); select all This snippet will add an image residing in ABSOLUTE_PATH to product, assign it to “image” attribute, move it from original location (true), and uncheck the “Exclude” option (false). Here’s Magento documentation on the method: void addImageToMediaGallery (string...