Gatsby | Support for gatsby-image on Rich Text fields

While I can set up gatsby-image on dedicated image fields, is there any way I can set up gatsby-image on the Images that are on Rich Text Fields?

I’m using:
“gatsby”: “^2.21.21”,
“gatsby-image”: “^2.4.3”,
“prismic-reactjs”: “^1.3.1”,
“gatsby-source-prismic-graphql”: “^3.6.2”,


Sorry for the delay with the reply.

If you want make any changes to how images in rich text are handled, then you need to do this in the HTMLSerialzer. You can read about this here:

What is your use case for gatsby-image in your project? If it’s for image processing, then did you know that all your images are coming pre-optimised from Prismic with our Imgix integration?

Check it out, it might save you re-doing a lot of work.


1 Like

I’m using it for a blog at and I just needed it for image optimization, if they come pre-optimized then then there’s nothing I need to do.

1 Like

A post was split to a new topic: Gatsby Lazy Loading and trace svg