reactjsimagegatsbyimgix

Gatsby with imgix


I am currently preparing to migrate away from WordPress and I am seriously considering Gatsby.

In WordPress land I use imgix to offload and process my images and I am interested to understand how to achieve this with Gatsby.

I can't find any documentation that covers using Imgix with Gatsby, although I have found react-imgix.

Can I use this with Gatsby?

Can I specify imgix images in the frontmatter of Markdown files using Gatsby?

Any information on the best way to handle external images from imgix in Gatsby would be great.


Solution

  • 2020 Edit: imgix is working on an official Gatsby plugin which will cover a variety of use cases, including the ones mentioned here. The plugins are located here: https://github.com/imgix/gatsby


    Gatsby is based on React, and imgix have already a plugin for React, so it should work out-of-the-box.

    Something different will be if you have to serve your file from your own server, where you will need gatsby-image to process it, but in this case, your component will convert to an <img /> tag with the corresponding src string and will work as expected.