Skip to content
Discussion options

You must be logged in to vote

It's resolution, not compression. On a retina screen (DPR 2), an image displayed at 640 CSS px covers 1280 device pixels. The <Image width="640"> output is only 640 px wide, so the browser upscales it. The Markdown one is the full-res original, so Safari downscales it, and that always looks sharper. That's also why quality="max" doesn't change anything.

Have Astro generate a 2x variant as well (astro 3.3+):

<Image src={cover} width={640} densities={[1, 2]} alt="" />

That outputs a srcset with 640 and 1280 px files. If the display width varies, use widths + sizes instead. Both are in the <Image /> reference. Densities larger than the source get skipped, so the original needs to be at least…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by delucis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants