Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

Will not load alternativeText from media #137

Closed
ergo-neil opened this issue Jul 9, 2020 · 4 comments
Closed

Will not load alternativeText from media #137

ergo-neil opened this issue Jul 9, 2020 · 4 comments

Comments

@ergo-neil
Copy link

Summary

I'm having a real weird issue when trying to get alternate text that is attached to media in my graphql query... If I set the media up as a single type
single-media
I then don't get any alternativeText avaliable in the graphql query builder
graphql-no-alt(single media type)

However if I set the media type to be multiple
multi-media
In my graphql builder the alternativeText field is there.
graphql-with-alt(multi media type)

It seems to be impossible to get alternativeText when the media is a 'single media' type, is there any way around this or is it a bug?

System:

OS: Ubuntu 16.04.6 LTS
Binaries:
Node: v10.18.1
npm: v6.13.4

npmGlobalPackages:
gatsby-cli: 2.22.15
gatsby-source-strapi: 0.0.12

@LilyLauben
Copy link

I'd like to bump this. It's also an issue I'm seeing on my project and it's very frustrating to either be unable to use the built-in alt and caption, or to be forced to use multiple image type fields all over my project, even where I only need one.

@ballPointPenguin
Copy link

I see this as well when I use media types within a single-type or a component type. It's like there's a whitelist of attributes or something. Querying my Strapi endpoint directly with GraphQL (not using gatsby) shows me all the attributes I expect to see. So my solution has been to stop using gatsby-source-strapi and use instead gatsby-source-graphql. https://www.gatsbyjs.com/plugins/gatsby-source-graphql/

@waynehaffenden
Copy link

+1 would like this too

@LilyLauben
Copy link

PR #118 looks like it does this, and also resolves a few other image related issues, so I hope it is merged in soon!

@soupette soupette mentioned this issue Feb 11, 2022
11 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants