Astro Info
Astro v6.0.0-beta.20
Node v24.13.1
System Linux (x64)
Package Manager pnpm
Output static
Adapter @astrojs/netlify
Integrations none
If this issue only occurs in one browser, which browser is a problem?
N/A
Describe the Bug
While fixing a bug related to images in the astro.build repo (withastro/astro.build#2227), we noticed Astro doesn't throw any errors when we don't specify dimensions for <Image /> using the Netlify adapter. The result was: the Themes page was unavailable in the deploy preview! (no errors, 200 status code).
I tried to reproduce this. I first thought this was a regression but using Astro 5 with the Netlify adapter doesn't throw an error (locally, Stackblitz behaves differently).
As, I said, Stackblitz behaves differently:
- locally, there is no errors, both in
dev and build modes
- in Stackblitz, the dev mode results in
UnhandledRejection instead of MissingImageDimension, which suggests that something is wrong here. Running build doesn't throw any errors!
I checked the behavior without adapter, with Vercel, and with Node: all three throws an error with a missing dimension. So, I suspect something is going wrong with the Netlify adapter...
What's the expected result?
I expect the Netlify adapter to behave like other adapters, or as if there were no adapter at all. Missing dimensions on a remote or public image should throw an error to warn the user early about an issue. Once deployed, this is not obvious what is going wrong: in the astro.build example, the build was fine and the page was blank with a 200 status code... Nothing pointing to the issue.
If this is an expected behavior, maybe we should mention something in the docs.
Currently we have this section related to images, but the "bug" is not related: the astro.build repo uses imageCDN: false while my reproductions doesn't change anything.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/astro6-images-netlify-adapter?file=src%2Fpages%2Findex.astro
Participation
Astro Info
If this issue only occurs in one browser, which browser is a problem?
N/A
Describe the Bug
While fixing a bug related to images in the
astro.buildrepo (withastro/astro.build#2227), we noticed Astro doesn't throw any errors when we don't specify dimensions for<Image />using the Netlify adapter. The result was: the Themes page was unavailable in the deploy preview! (no errors, 200 status code).I tried to reproduce this. I first thought this was a regression but using Astro 5 with the Netlify adapter doesn't throw an error (locally, Stackblitz behaves differently).
MissingImageDimensionerror (both locally and in Stackblitz).As, I said, Stackblitz behaves differently:
devandbuildmodesUnhandledRejectioninstead ofMissingImageDimension, which suggests that something is wrong here. Runningbuilddoesn't throw any errors!I checked the behavior without adapter, with Vercel, and with Node: all three throws an error with a missing dimension. So, I suspect something is going wrong with the Netlify adapter...
What's the expected result?
I expect the Netlify adapter to behave like other adapters, or as if there were no adapter at all. Missing dimensions on a remote or public image should throw an error to warn the user early about an issue. Once deployed, this is not obvious what is going wrong: in the
astro.buildexample, the build was fine and the page was blank with a 200 status code... Nothing pointing to the issue.If this is an expected behavior, maybe we should mention something in the docs.
Currently we have this section related to images, but the "bug" is not related: the
astro.buildrepo usesimageCDN: falsewhile my reproductions doesn't change anything.Link to Minimal Reproducible Example
https://stackblitz.com/edit/astro6-images-netlify-adapter?file=src%2Fpages%2Findex.astro
Participation