How to force image pipeline to resize (and crop?) images at build time #1
|
E.g. I have high-res cover images in my Markdown frontmatter (so already imported via Astro image pipeline), now I'd like to display these images in a card grid as thumbnails (with fixed statically known resolution). How do I ask Astro to generate low-res versions for thumbnails at build-time? (in my Is it also possible to specify cropping / object-fit options? Can I specify these as attrs of |
Answered by
florian-lefebvre
Aug 20, 2026
Replies: 1 comment 2 replies
|
You can pass these options directly to the ---
const data = [/*...*/]
---
{data.map(e => <Image src={e.image} alt="" quality="low" />)}Does that answer your question? |
2 replies
Answer selected by
vadimkantorov
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can pass these options directly to the
Imagecomponent (reference here: https://docs.astro.build/en/reference/modules/astro-assets/#image-). For example:Does that answer your question?