Closed olavea closed 2 years ago
Instead of the adding cloudinaryAssetData: true
to the data defining the Cloudinary asset, the user will have to configure the plugin with the GraphQL types defining the Cloudinary asset. No new nodes will be created for these assets, the image resolvers will be added onto the exiting type.
We need help testing this PR, especially on existing larger projects 🙏 It has the same changes as #173, but also adds support for Gatsby v4 🎉 However it still works with Gatsby v3, so test it with your current set up first.
Install the beta version:
yarn add gatsby-transformer-cloudinary@beta-v4
or npm install gatsby-transformer-cloudinary@beta-v4
transformTypes
plugin options.
publicId
and cloudName
as the minimum. If you add originalWidth
, originalHeight
and originalFormat
you'll save a network request getting that info when querying gatsbyImageData
. If its directly on a node it would be the node type.cloudinaryAsset
set to true is no longer required, but will do no harm staying presentTest that your gatsby-image
components still works in v3:
✅ gatsby-image v3
comment below if it does,⛔️ gatsby-image v3
with more information if it does not.Test that your gatsby-image
components still works in v4:
✅ gatsby-image v4
comment below if it does,⛔️ gatsby-image v4
with more information if it does not.It would also be great if you could test that gatsby-plugin-image
works with v4 or v3:
yarn add gatsby-plugin-image@1.14.2
or npm install gatsby-plugin-image@1.14.2
yarn add gatsby-plugin-image@2.17.0
or npm install gatsby-plugin-image@2.17.0
✅ gatsby-plugin-image v3
or ✅ gatsby-plugin-image v4
comment below if it does,⛔️ gatsby-plugin-image v3
or ⛔️ gatsby-plugin-image v4
with more information if it does not.Migration can be done one query at the time, no need to migrate all at once as the fluid
and fixed
resolvers are still there together with the new gatsbyImageData
. Check out the examples for gatsby-image and gatsby-plugin-images side by side.
Closes #156