Answer the question
In order to leave comments, you need to log in
How to generate alt and title for an image?
On each page of the site (online store) there is a product name in H1
How to generate alt and title for short images will be like H1 on the page?
Answer the question
In order to leave comments, you need to log in
It all depends on the CMS. What is used?
Basic knowledge of php is required.
Something like that:
var alt = $("h1").text();
$.each($('img'), function(){
if ($(this).attr("alt").length == 0) {
$(this).attr("alt",alt);
}
if ($(this).attr("title").length == 0) {
$(this).attr("title",alt);
}
});
Maybe the SEO Friendly Images plugin will do . According to the description, it does what it's supposed to do.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question