Fix image urls in dev #22
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Post images now working reliably for me, thumbnails still not, how about you?
Running dev script now does not work, can't connect to mongodb it seems
/docker-entrypoint.sh: line 30: MONGODB_USER: unbound variable
astroad-astro | 16:13:27 [ERROR] fetch failed
astroad-astro | Stack trace:
astroad-astro | at node:internal/deps/undici/undici:12502:13
astroad-astro | at async Module.getPosts (/base/src/utils/payload.ts:8:11)
astroad-astro | [...] See full stack trace in the browser, or rerun with --verbose.
astroad-astro | Caused by:
astroad-astro | getaddrinfo ENOTFOUND payload
astroad-astro | at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:26)
astroad-payload | /docker-entrypoint.sh: line 30: MONGODB_USER: unbound variable
Ah 😖 Looks like it's trying to run the
-prod
container locally still? Latest commit tries to fix it... can't test locally because of spooky network error thoWhen running the dev script the image URL is constructed differently than the build script
DEV
src="/_image?f=webp&w=150&h=150&ar=1&href=cow.gif"
PROD
src="/_astro/cow_ZPFrIy_NWQNh.webp"
Images exist in astro container
In prod
In dev
In dev with corrected url
But why is the url different?
Don't really know, I will have to learn more about how astro builds and optimizes images. In any case I think this one is a matter of configuration in astro