Astro Images and Images in Keystatic #372
-
I have a homepage singleton as follows:
I would like to place the images in the assets directory in Astro so that I could make use of their great image optimization features. This won't work because I can't do something like This may ultimately be more of an issue with what can be done with JavaScript but was wondering if anyone was using images with Astro images rather than just plopping it in the public directory which isn't compressed. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi! Several others are also having a similar problems regarding the content collections integration with astro assets. You have probably tried this already, but in case you haven't: |
Beta Was this translation helpful? Give feedback.
-
As of Not sure what the full implications of this are (because there are so many ways and motivations for how people might have image working, across various frameworks) and it may be a breaking change for anyone depending on the Let us know if there's anything else we can do to make this smoother 👍 |
Beta Was this translation helpful? Give feedback.
As of
@keystatic/[email protected]
we're no longer prepending the/
at the start ofpublicPath
for images.Not sure what the full implications of this are (because there are so many ways and motivations for how people might have image working, across various frameworks) and it may be a breaking change for anyone depending on the
/
prefix without specifying it, but we wanted to unblockastro:assets
compatibility so we've shipped it (see #471)Let us know if there's anything else we can do to make this smoother 👍