Allow us to generate Contentful image fluid and fixed props outside of Graphql #24633
Labels
stale?
Issue that may be closed soon due to the original author not responding any more.
topic: source-contentful
Related to Gatsby's integration with Contentful
type: feature or enhancement
Issue that is not a bug and requests the addition of a new feature or enhancement.
Summary
Generate fluid props without using graphql so we can use gatby-image in Contentful Rich Text
Basic example
The code is written already inside gatsby-source-contentful under extend-node-type.js we just need a way to access it!
Motivation
Folks that are using Contentful's Rich Text are having a hard time implementing gatsby-image when they render the node coming from the rich text data. Since all it's returning is the asset data. With no access to
GatsbyContentfulFluid
orGatsbyContentfulFluid
fragments.The current solutions are very hacky or could slow down whole gatsby sites.
I was inspired by how Sanity's gatsby source allows users to access gatsby-image outside of gatsby with a simple api.
Proof of concept
Here's a gist. All copy pasted from extend-node-type with just a slight rename of the api
The text was updated successfully, but these errors were encountered: