-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite README to explain how to add Gatsby image support to Cloudinary image data sourced from Sanity CMS #246
Labels
documentation
Improvements or additions to documentation
Comments
olavea
added
documentation
Improvements or additions to documentation
hacktoberfest
labels
Oct 2, 2023
olavea
changed the title
Rewrite README to explain how to use this plugin with Sanity CMS
Rewrite README to explain how to use this plugin with Sanity Cloudinary Plugin
Oct 2, 2023
olavea
changed the title
Rewrite README to explain how to use this plugin with Sanity Cloudinary Plugin
Rewrite README to explain how to add Gatsby image support to Cloudinary image data sourced from a CMS
Oct 2, 2023
olavea
changed the title
Rewrite README to explain how to add Gatsby image support to Cloudinary image data sourced from a CMS
Rewrite README to explain how to add Gatsby image support to Cloudinary image data sourced from Sanity CMS
Oct 2, 2023
@olavea I can work on this issue, can you please provide me some links (for the info which is to be added in the README.md) where can i refer to. |
This is the same code but for Contentful. (I have a gallery record that contains many images.)gatsby-node.js
gatsby-config.js
Sample query
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As stated in issue #214, gatsby-transformer-cloudinary does not work with the Sanity Cloudinary Plugin. Not out of the box.
So the README needs a new main headin called "Add Gatsby Image Support to Cloudinary image data sourced from a CMS"
Sanity creates nodes with fields of type
SanityCloudinaryAsset
when you pick an image from Cloudinary. Unfortunately it does not have the shape require by gatsby-transformer-cloudinary.To get around that you may create nodes with the correct shape.
Let say we have the Gatsby node of type
SanityArticle
with a field cover of typeSanityCloudinaryAsset
You may now query for the
gatsbyImageData
on coverImage:The text was updated successfully, but these errors were encountered: