cancel
Showing results for 
Search instead for 
Did you mean: 

How can I update image alt tag for all products via code?

How can I update image alt tag for all products via code?

I want to set the value for  image alt tag to product title via code, as I have huge number of products in catalog. 

 

I am trying to update but its not working please help.

 

Attached is the screen shot for the code i have been implementing

 

https://www.screencast.com/t/zUlLrlZrKsMY

2 REPLIES

Re: How can I update image alt tag for all products via code?

Hi @manpreetwebcefz,

 

What if you create a file to be improted with something like:

 

sku;website_id;additional_images;additional_image_labels
BB142;1;/1/7/1700x700x380mm-round-single-ended-bath-front-view-bb142-v5001.jpg,/1/7/1700x700x380mm-round-single-ended-bath-close-up-view-bb142-v5000.jpg,/1/7/1700x700x380mm-round-single-ended-bath-zoomed-out-view-bb142-v5001.jpg,/1/7/1700x700x380mm-round-single-ended-bath-dimensions-i2-bb142-v5000.jpg;,Test image 1,,Test image 4

(The example is from this bug report: https://github.com/magento/magento2/issues/9120 )

--
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"

enable Admin notification for new user registerration and for sale

 How can enable Admin notification for new user registration and for sale

Tags (1)