-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Astro Image component does not work on Netlify using SSR #4794
Comments
This seems to not work again, opening a new issue. |
Having the Same issues also. Works in development, not in production. |
Same issue here, work in dev. not in prod. |
export default defineConfig({
site: // ...
integrations: [
mdx(),
sitemap(),
prefetch({
intentSelector: '[data-prefetch]',
throttle: 10,
}),
tailwind(),
react(),
],
output: 'hybrid', // JUST ADD THIS AND IT ALL WORKS! YAY!
adapter: netlify(),
}); All you have to do is change
|
Hey @Leiloukou, I tried your solution. However, my webpages show up blank now. Here is what my astro.config.mjs file look like
|
What version of
astro
are you using?1.2.6
Are you using an SSR adapter? If so, which one?
Netlify
What package manager are you using?
npm
What operating system are you using?
Mac
Describe the Bug
The image component does not render images correctly in Production on Netlify using the
@astrojs/netlify
adapter. Everything works fine in dev mode but once deployed to Netlify the image endpoint fails to generate and return images, instead it throws the following error:The image "URL" cannot be displayed because it contains errors.
A deployed site using the minimal Reproducible Example can be found here:
https://astro-image-ssr-reproduction.netlify.app/
Link to Minimal Reproducible Example
https://github.com/lgastler/astro-image-ssr-reproduction
Participation
The text was updated successfully, but these errors were encountered: