CMS Development

iusmanabbasi
Participant

Image ALT Tag Not working for some blog posts.

SOLVE

Hi there,

 

I want to add alt text to already uploaded images in the File Manager. However, when I add alt text from Accessibility > Alt Text, it does not set the attribute when the page loads. It's like adding that alt text did not have any effect at all.

If I inspect the image, it shows "alt" only, with no value assigned to it.


And for some images, it's successfully getting the alt info although the Accessibility > Alt Text is empty. I know if alt is empty then the file name is used as alt text. If this is the case then why is it also not working for all the images on the site?

 

 

 

I need help setting up alt texts for images on the site.

1 Accepted solution
felixmacaspac
Solution
Contributor

Image ALT Tag Not working for some blog posts.

SOLVE

Hey, @iusmanabbasi it would be helpful for us to identify the problem if you could show some code of the blog posts page.

 

but if your image alt is using the "featured_image_alt_text" you need to add an alt text in the featured image inside the blog post content editor setting.

View solution in original post

5 Replies 5
lkhan6
Member

Image ALT Tag Not working for some blog posts.

SOLVE

An alt tag (also called "alt attribute" or "alt description") is an HTML attribute that provides a text description of an image. This text is used to provide context for the image and is displayed if the image is unable to be loaded. Alt tags are also used by screen readers for visually impaired users to better understand the content on a webpage.

If you are having trouble with some of your blog posts where the alt tags are not working, there could be a few possible causes:

  1. Incorrectly formatted alt tags: Make sure that the alt tags are properly formatted and placed within the image's img tag. The correct syntax for an alt tag is alt="description".

  2. Alt tags missing: Make sure that you have included alt tags for all images on your blog post.

  3. Not enough information in the tags: Try to be as descriptive as possible in the tags, avoid using empty tags or one-word tags.

  4. Incorrect file names: ensure that the images file name is meaningful, if the image name is something like IMG4567.jpg, the alt tag should describe what is in the image.

  5. Scripts or plugins: Ensure that any scripts or plugins that may be running on your blog are not interfering with the alt tags.

  6. Check with developer tool: Use developer tools in your browser (like Chrome's dev tools) to inspect the images and see if the alt tags are present and correctly formatted.

You may want to go through your blog post one by one and check for the above mentioned points to fix the issue, if you are still having trouble, you can also reach out to your blog's customer support or the developer for help.

0 Upvotes
GRajput
Recognized Expert | Platinum Partner
Recognized Expert | Platinum Partner

Image ALT Tag Not working for some blog posts.

SOLVE

Hi @iusmanabbasi,

 This is a very nice query, this topic is already discussed in old conversation.

 

https://community.hubspot.com/t5/Blog-Website-Page-Publishing/Updating-ALT-Text-within-Files-on-imag...

 

 I hope this link will solve the query. If not you can contact me again here.

Thank you!

Gaurav Rajput




Gaurav Rajput
Director, MarTech( Growth Natives)

Book a meeting


iusmanabbasi
Participant

Image ALT Tag Not working for some blog posts.

SOLVE

Hi @GRajput!

 

Thanks for sharing this. I checked the thread but the problem remains. If I add alt text to any image from the File Manager >  Accessibility > Alt Text, it doesn't add it to the image when I refresh the website. I even tried it by uploading a new image, adding alt text from file manager, and then opening that image in a new tab.

 

I am still stuck at the same point. I appreciate it if you can guide me here.

felixmacaspac
Solution
Contributor

Image ALT Tag Not working for some blog posts.

SOLVE

Hey, @iusmanabbasi it would be helpful for us to identify the problem if you could show some code of the blog posts page.

 

but if your image alt is using the "featured_image_alt_text" you need to add an alt text in the featured image inside the blog post content editor setting.

iusmanabbasi
Participant

Image ALT Tag Not working for some blog posts.

SOLVE

Thanks! Works like a charm!