Skip to content

Disable local Netlify Image CDN not working #14793

@jmgala

Description

@jmgala

Astro Info

Astro                    v5.15.8
Node                     v24.10.0
System                   macOS (arm64)
Package Manager          unknown
Output                   static
Adapter                  @astrojs/netlify
Integrations             none

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

Hello, I am using the Netlify adapter with the devFeatures option to disable the local Netlify Image CDN during local development, following the instructions from https://astro.build/blog/astro-5120/. However, it appears that the setting is being ignored. Setting imageCDN to false does work once deployed to Nelify.

If I inspect the image on the console, I see "/.netlify/images?" being added to the source. What am I missing? This looks very straightforward, thanks.

This is my astro.config.mjs:

import { defineConfig } from 'astro/config'
import netlify from '@astrojs/netlify'

export default defineConfig({
    adapter: netlify({
        imageCDN: false,
        devFeatures: {
            images: false,
            environmentVariables: false,
        },
    })
})

What's the expected result?

Images not to be served via Netlify CDN

Link to Minimal Reproducible Example

https://github.com/jmgala/disable-local-Netlify-Image-CDN

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    - P4: importantViolate documented behavior or significantly impacts performance (priority)pkg: netlifyRelated to the Netlify adapter

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions