Skip to content

allow turning the local Netlify Image CDN on/off in dev#14807

Merged
florian-lefebvre merged 5 commits intowithastro:mainfrom
jmgala:disable-local-Netlify-Image-CDN-not-working
Nov 25, 2025
Merged

allow turning the local Netlify Image CDN on/off in dev#14807
florian-lefebvre merged 5 commits intowithastro:mainfrom
jmgala:disable-local-Netlify-Image-CDN-not-working

Conversation

@jmgala
Copy link
Contributor

@jmgala jmgala commented Nov 19, 2025

Changes

  • The devFeatures.images option in the Netlify adapter was being ignored during local development
  • The vitePluginOptions.images.enabled flag now correctly reflects devFeatures.images as described in the documentation
  • Closes Disable local Netlify Image CDN not working #14793

Testing

Verified locally by running astro dev with different configurations:

  • devFeatures.images: false disables the Netlify Image CDN in dev.
  • devFeatures.images: true or omitted (default) keeps it enabled.
  • Production builds (astro build) remain unaffected.

Docs

https://docs.astro.build/en/guides/integrations-guide/netlify/#devfeatures

@changeset-bot
Copy link

changeset-bot bot commented Nov 19, 2025

🦋 Changeset detected

Latest commit: 3514649

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: integration Related to any renderer integration (scope) label Nov 19, 2025
@florian-lefebvre
Copy link
Member

Hey thanks for opening a PR! Looks like this change has an unintended effect on the defaults, looking at the tests. Do you mind fixing it so the tests pass again?

@jmgala
Copy link
Contributor Author

jmgala commented Nov 25, 2025

Hello @florian-lefebvre, good catch. I have updated the defaults, and the tests are passing now, except for one that I don't know what it's about.

Fixes a case where disabling the local image CDN wasn't possible
Copy link
Member

@florian-lefebvre florian-lefebvre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@florian-lefebvre florian-lefebvre merged commit c17767a into withastro:main Nov 25, 2025
23 of 24 checks passed
@astrobot-houston astrobot-houston mentioned this pull request Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: integration Related to any renderer integration (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disable local Netlify Image CDN not working

2 participants