Netlify Image CDN not working with Gatsby and Contentful plugin

Hi,

I’m trying to implement Netlify Image CDN on a Gatsby site using Contentful as the CMS, but so far, all images are still being served through Contentful’s CDN.

I’ve set the environment variable NETLIFY_IMAGE_CDN to true. I’ve added the remote_images property to the netlify.toml file. I’ve updated Gatsby, gatsby-adapter-netlify, and all other Gatsby plugins to their latest versions. I’ve also enabled the imageCDN option of the adapter in the Gatsby config.

What am I missing?

Here is my branch deploy: https://migrate-to-gatsby-v5--ace-hotel.netlify.app

And here is my netlify.toml file:

[build]
  command = "gatsby build --log-pages"
  publish = "public"

[build.environment]
  NETLIFY_IMAGE_CDN = "true"

[images]
  remote_images = ["https://images.ctfassets.net/guen72jxl4tk/.*"]

[[redirects]]
  from = "https://www.sighor.fr/*"
  to = "https://www.ace-hotel.com/"
  status = 302

[[redirects]]
  from = "/"
  to = "/en/"
  status = 302
  conditions = {Language = ["en"]}

[[redirects]]
  from = "/"
  to = "/fr/"

[[redirects]]
  from = "/:lang/:parent/:slug"
  to = "/:lang/:parent/"

[[redirects]]
  from = "/:lang/*"
  to = "/:lang/404/"
  status = 404

[[headers]]
  for = "/*"
    [headers.values]
    Access-Control-Allow-Origin = "*"

Thanks in advance!

hey @tomtuv thanks for reaching out, and apologies for the delay here! I’ve escalated this internally as I’m also seeing some potential inconsistencies in the image transformations here - we’ll follow up again on this thread as soon as we have more info to share!