sanity-plugin-media icon indicating copy to clipboard operation
sanity-plugin-media copied to clipboard

altText metadata field doesn't exist

Open lorraineS opened this issue 3 years ago • 2 comments

The altText field does not exist in my GraphQL query. Nothing to report concerning the title and description fields

Capture d’écran 2021-09-29 à 19 16 31

However, when uploading the media, I have the possibility of adding this ALT attribute:

Capture d’écran 2021-09-29 à 19 20 54

Is this a bug or does it require additional action?

Thanks

lorraineS avatar Sep 29 '21 17:09 lorraineS

@lorraineS I believe this might be a gatsby source issue. I'm not familiar with Gatsby, so I can't offer much advice right now – except that I believe gatsby-plugin-sanity-image might help you get around this issue (search for sanity-plugin-media on that README)

I can however confirm that altText is officially on the image asset document schema, and is accessible via Sanity's GraphQL endpoint (e.g. when running sanity graphql deploy)

robinpyon avatar Oct 14 '21 15:10 robinpyon

@lorraineS thanks for reporting!

I couldn't reproduce this, can you double-check if you ran sanity graphql deploy --playground after installing the media plugin? Also, could you test to see if Sanity's GraphQL playground is exposing altText?

Thanks in advance 🙌

For reference, here's what I'm getting in Graph_i_QL: image

hdoro avatar Oct 15 '21 13:10 hdoro