Closed Wulfre closed 4 months ago
Thank you for bringing this issue to our attention. Please note that the behavior you've observed is intentional and is documented in our docs (https://docs.astro.build/en/guides/images/#where-to-store-images).
At this time, there are no plans to modify this behavior. As a workaround, you can use absolute full URLs for your images instead of relative URLs when accessing them from the public folder.
Astro Info
Describe the Bug
Images being sourced from the public directory using relative paths, for example
/images/image.png
are not being transformed into their resized versions. I believe the issue is due to this line since the image is neither an ESM import, nor does it pass theisRemoteAllowed
check, since it is not a remote path.What's the expected result?
I expect these relative image paths to also be transformed to their respective
/cdn-cgi/image
paths so that they can be displayed at the intended size.Link to Minimal Reproducible Example
Repo: https://github.com/Wulfre/wulf.re/tree/a589fccc63ce140541c40535ec3d61b85cec969f Deployment: https://1a32c833.wulf-re.pages.dev/
Participation