datocms / gatsby-source-datocms

Official GatsbyJS source plugin to pull content from DatoCMS
MIT License
140 stars 50 forks source link

Empty alt tags in gatsby-plugin-image placeholder #160

Closed jdozierezell closed 3 years ago

jdozierezell commented 3 years ago

After upgrading to the latest version of this plugin, along with gatsby-plugin-image, I'm getting the following error:

Warning: Failed prop type: The prop `alt` is marked as required in `MainImage`, but its value is `undefined`.

The images' alt tags are populated properly in the visible image once it loads, so the data is there, but it doesn't seem to be making its way to the placeholder.

Is there a way to ensure that the alt tag is either populated or the error suppressed?

stefanoverna commented 3 years ago

Hey @jdozierezell, what's MainImage?

jdozierezell commented 3 years ago

@stefanoverna sorry, it's GatsbyImage. I'm not entirely sure why, but the error is returned differently in the browser console than in the terminal.

At any rate, this is a non-issue. I realized that I wasn't running the latest for gatsby-plugin-image or the datocms plugin. I upgraded both and the error is gone. I'll close this one. Thanks.