-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[@astrojs/image] fetch failed when using images in public folder with Image component #5714
Comments
update: this seem to only happen with node v18 As a hopefully temporary solution I downgraded to v16.19.0 and it works just fine now. |
mark |
Similar setup as @sek-consulting (Node 18 LTS, Windows 10), also having trouble with the Image component from just any file. Here is the traceback I get when running
Taking a look at @astrojs/image/dist/vendor/squoosh/mozjpeg/mozjpeg_node_enc.js:446:18, it seems to be some sort of WebAssembly loader function. |
It works well on my Mac. |
What version of
astro
are you using?1.8.0
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
npm
What operating system are you using?
Windows 10
Describe the Bug
When trying to use the Image component with files from the public folder like this
<Image src="/001.jpg" alt="the moon" width="400" aspectRatio="1:1" format="jpg" />
I get the following error in the console:
fetch failed
The browser console tells me it's an error 500 for this request:
GEThttp://localhost:3000/_image?f=jpg&w=400&h=400&ar=1:1&href=/001.jpg
After consulting with #support on the discord the error still couldn't be fixed, so I created a small barebones project and uploaded it to a new github repo which you can find below.
Would love to get this solved since I really start to love Astro for building sites quickly, which is the reason why I started to port my photo portfolio website from php/html/css to astro/vue/tailwind.
THANKS <3
If I can provide more info just let me now :)
Link to Minimal Reproducible Example
https://github.com/sek-consulting/astro-image-problem
Participation
The text was updated successfully, but these errors were encountered: