• msnemark

    (@msnemark)


    what’s the difference between adding ALT text in the WordPress media library for an image vs. adding ALT text to an image block in a WordPress post using Gutenberg?

    It appears that the block ALT text shows up when the page is loaded into a browser. Where does the media library alt text get used?

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Joy

    (@joyously)

    If you put text on the image in the media library, it will be used everywhere that you didn’t specify other alt text.
    If you put text on the image in the block, it will only be used on that block.

    Thread Starter msnemark

    (@msnemark)

    Hi Joy, Thanks for your reply.

    After doing some testing (latest WP, Astra Free Theme), in order for what you said above to happen, I had to:

    1. import the image into media library first
    2. set ALT text in media library
    3. insert image into post

    If I:

    1. drag image into post from Windows 10 folder
    2. change ALT tag in media library

    The ALT text does no show up in a loaded page.

    So it seems that if I change the alt text in the media library after putting the image in a post the alt text won’t transfer to the post.

    Thanks again,
    Martin

    Joy

    (@joyously)

    Yes, that is correct for image blocks. For images in gallery shortcodes, the alt text would be used once it is entered. For images that were inserted in the Classic editor, whatever it said when it was inserted would be there (like the block, it is referenced once when inserted). Featured images are also dynamic, but usually do not have a caption (although they should use alt text). Same for header images. I’m not sure about image widgets.

    Thread Starter msnemark

    (@msnemark)

    Thanks Joy!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WP media library ALT text vs. image block ALT text’ is closed to new replies.