cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically set base image

Programmatically set base image

Hello,

 

Running 2.0.2 and all products have an image except for a selection of the simple products used in configurable products. When I imported from the old WP-Ecommerce store, some products for some reason didn't have a default image set. With over 10k products in the store I am looking for a way to see if I can programmatically set the single image each product has as the base image for that product as well.

 

Does anyone have any ideas? Help is appreciated!

2 REPLIES 2

Re: Programmatically set base image

Active community here....

Re: Programmatically set base image

Hi, rather than set it programmatically, have you tried using the M2 import functionality? You can upload the images to a folder on your server, and add the filename of your images in the csv (e.g. baseimage.jpg) and then in the import screen below where you select the csv file to import, you can set the path to the image files directory.

 

Hope that helps

Magento Solution Consultant at Inviqa (formerly Session Digital) - Leading Magento Gold Partner
My own blog - Think Commerce