Site logo

[Resolved] alt-text for SVGs are not available in front-end source

Home Forums Support [Resolved] alt-text for SVGs are not available in front-end source

Home Forums Support alt-text for SVGs are not available in front-end source

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1803392
    Hardik

    Hello,

    I’m using Safe SVG plugin (as suggested by many users on this forum) to safely upload SVGs into WordPress Media Library and using some of them under Generatepress Elements to design a global sitewide footer. These SVGs are being added using the default image block.
    I have inserted alternate text for the SVGs inside the Media Library but to my surprise, they are not available in the front-end source code for the search engines to digest. This happens with SVGs only. I’ve tried clearing cache but to no avail.

    Any pointers in this matter will be very helpful.

    Thanks!

    #1803751
    Leo
    Staff
    Customer Support

    Hi there,

    I feel like this would be a image block issue which is a WordPress core block.

    Let’s go through some debugging steps.

    – Is the alt tag added in a normal images like .jpg or .png using the image block?

    – I doubt this matters but what if you add the SVG image inside the normal page content without GB?

    – Does the same issue exist in a Twenty series WP theme?

    #1803781
    Hardik

    – Is the alt tag added in a normal images like .jpg or .png using the image block?

    I created a page (keeping Generatepress as the theme) and 2 JPGs and SVGs using image blocks. alts are visible.
    On the same page I assigned it’s own dedicated footer. On that footer block element, I added the same 4 images and to my surprise, alts are visible.

    Hence, I believe something’s wrong with either the image block in the global footer element or that global footer element is bugging out.

    #1804888
    Tom
    Lead Developer
    Lead Developer

    The image block builds static HTML, so if the alt is visible in the editor HTML, it should be visible on the front-end as well.

    Maybe try completely deleting the image block from the footer element and add a fresh one?

    #1804924
    Hardik

    Thank you, alts are now visible on the front-end source after deleting and adding fresh image blocks.

    #1806146
    Tom
    Lead Developer
    Lead Developer

    Great to hear 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.