Showing results for 
Search instead for 
Did you mean: 

How to add alt tag to category pictures


How to add alt tag to category pictures

Magento ver. -


How would I go about adding an alt tag to my category images. They're different than product images and don't have a field to type in a description. Would this be something where I would have to update the template file? Focusing my efforts on SEO for the week and it came to my attention that none of my category images have alt tags. I have 655 categories at the moment and plan on adding hundreds of more in the future. Would be extremely helpful!


Re: How to add alt tag to category pictures

@AP_bromanBy default Magento has alt tag on all the images. For category images alt/title tag contains the name of the category. If you are not seeing it means you are using custom theme which has the issue. Below is an article has multiple code snippet to achieve the same.


Problem Solved? Please give Kudos and accept answer as Solution.

Magento 2 Certified Solution Specialist (x2). Follow me on Twitter

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 Suggest
.Attached screen shot for the code i have been implementing

Tags (1)