[Resolved] Unable to add Alt tags to images

Home Forums Support [Resolved] Unable to add Alt tags to images

Home Forums Support Unable to add Alt tags to images

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2044148
    Mary Pearson

    I am starting to edit https://easternhillsrenovations.ca/flooring/ for SEO.

    Rank Math tells me to
    “Add an image with your Focus Keyword as alt text.”

    I have added alt tags to my images in the media library, but they are not showing up in the coding, and if I add the alt tag manually in the code editor, as soon as I update, it disappears.

    Example:

    If I add the alt tag of “flooring” in the Code Editor

    <!-- wp:generateblocks/container {"uniqueId":"ba4ae159","innerContainer":"full","minHeight":400,"paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","verticalAlignment":"flex-start","isDynamic":true,"blockVersion":2} -->
    <!-- wp:cover {"url":"https://easternhillsrenovations.ca/gay-content/uploads/flooring-1400x400-1.jpg","id":1705,"contentPosition":"center center","align":"full","className":"has-parallax"} -->
    <div class="wp-block-cover alignfull has-background-dim has-parallax"><img class="wp-block-cover__image-background wp-image-1705" alt="flooring" src="https://easternhillsrenovations.ca/gay-content/uploads/flooring-1400x400-1.jpg" data-object-fit="cover"/><div class="wp-block-cover__inner-container"><!-- wp:paragraph -->
    <p></p>
    <!-- /wp:paragraph -->

    As soon as I update, the word “flooring” disappears.

    Can you tell me how to deal with this please. I have requested support from Rank Math and they suggest I ask the theme author.

    Many thanks!

    #2044174
    Ying
    Staff
    Customer Support

    Hi Marry,

    You are using a Cover block to add the image, Unfortuanly GP has no control over how this block behave Unfortuanly.

    #2044179
    Mary Pearson

    Thank you. What block should I be using?

    #2044233
    Elvin
    Staff
    Customer Support

    Hi Mary,

    You can try recreating the same layout with a GenerateBlocks Container block with a headline block in it.

    Set a background image and add padding-top and padding-bottom to the container block to control the size of the cover section.

    Since the image is a background image, you shouldn’t need to assign an alt for it.

    A wise man once said:
    "Have you cleared your cache?"

    #2044675
    Mary Pearson

    Thank you so much Elvin. I was unable to create as you suggested but found another block “Media and Text” and it is working perfectly for me.

    Thank you again to you and Ying.

    #2046895
    Elvin
    Staff
    Customer Support

    No problem. 😀

    A wise man once said:
    "Have you cleared your cache?"

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