0

I have upload some products using script. I am using below code for upload images.

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();

$product_images = $objectManager->create('\Magento\Catalog\Model\Product')
 ->load($product->getId());

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

$product_images->save();

I have 2 stores and after upload product data i can see products images on first store and on second store i can only see product images on product detail page.

i can't see products images on home page and product list page for second store.

i have already doing indexing and caching process.

can you please help to resolve the issue.

0

Go to Admin -> Stores -> Configuration -> General -> General -> Single-Store Mode

Enable Single-Store Mode to Yes

& setStoreId(1);

Magento 2: Save all product data outside Magento with Images

Follow above URL

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.