This image has an empty alt attribute

  • This image has an empty alt attribute; its file name is

    I found a few instances of this problem in the forum but it doesn’t behave for me the same way.. I’m wondering if there is some way to fix?

    Adding and image to a new, private, or published post is giving the same message when i try adding any image from the media library into a block:

    “This image has an empty alt attribute; its file name is file_name.jpg”

    When I save it the image height is reduced, and the same thing is true when I return to edit the page. I added a few screenshots below that show the error in the dashboard and the front end.

    I have Litespeed but there are no image optimizations enabled and no other plugins installed for that or SEO, etc. My browser is not blocking any content.

    According to client this just recently started occurring. Any input or help is appreciated.

  • Hi there,

    It looks like you’re using the core WordPress Image block.

    Are you using GenerateBlocks? If so, does the issue still happen when using the GenerateBlocks Image block instead?

    If possible, please share the page URL where the image is located so we can take a closer look.

  • Hi Alvind,

    Yes. Using the image block.

    Added a URL below.

    Might be a clue: I notice while using the editor the console is showing for the image a

    Failed to load resource: the server responded with a status of 403 ()

    This does not happen in the front end.

  • Glad to hear that 🙂

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