When Prismic support gatsby-plugin-image?

I am wondering when Prismic support gatsby-plugin-image.

2 Likes

Hi Krittiya,

Thank you for contributing to the Prismic community,

Prismic integrates Imgix to process images which comes with a variety of advantages, and I order to Implement responsive Images such as what gatsby-plugin-image do you can use this Imgix react plugin where you can use it as the following:

<Imgix
	sizes="(min-width: 960px) 33vw, (min-width: 640px) 50vw, 100vw"
	src={buildURL(image)}
	imgixParams={{
		fit: "crop",
		fm: "jpg"
	}}
	width={600}
	height={600}
/>

For this reason, we currently don't have plans to support the gatsby-plugin-image even though you can try to pass the image URL manually if you still want to use the gatsby-plugin-image.

Please let us know if you have any other questions.
Fares

Thank you!

Is this plugin optimized to be as good as the Gatsby image plugin ? Since the Gatsby image package is now deprecated, my website performance has decreased significantly.

Hey @hellokrittech, the Gatsby Image component is indeed now deprecated, but the deprecation has no effect on your site's speed. gatsby-image will continue to work as intended.

That being said, gatsby-plugin-image includes major underlying improvements that provide even better speed. It also plays much nicer with the metrics tested in Google Lighthouse.

Support for gatsby-plugin-image for gatsby-source-prismic is in the works. Bringing in support requires integrating with Imgix's Gatsby plugin, @imgix/gatsby. Imgix is currently working on making their gatsby-plugin-image support available to plugins. Once it's ready to integrate, it will be added in the next major version of gatsby-source-prismic (V4).

1 Like

it seems like it's been updated on their side. Can't wait to integrate it - is there an ETA on a v4 alpha I could start playing with?

That's right, Imgix supports gatsby-plugin-image with their new component and Gatsby plugin. It currently does not have functionality to integrate within other source plugins, which we need to provide proper gatsby-plugin-image support. We're working with Imgix to get this working, however!

There isn't an estimate to release V4 yet, but we are working on getting it into everyone's hands as soon as possible. Once a beta is ready for public testing and documentation is available, we will make an announcement.

This is being tracked as an open feature request.

If you have another use-case for this feature, you can 'Flag' this topic to reopen. Please use the :heart: button to show your support for the feature and check out our Feature Request Guidelines.