Replies: 2 comments 2 replies
-
Thanks for the feedback @SoCuul! I think when I built the component, I chose a size that was a reasonable trade-off between performance and quality across viewport widths. Since then, Astro has added tools to make it easier to include multiple resolutions, so we can probably revisit that to provide hero images that are optimized, but not so low resolution for larger devices. |
Beta Was this translation helpful? Give feedback.
-
Ah, just realised something else: your site has some custom styles to display the hero image larger than the default, which obviously makes this issue really obvious — a 400px wide image is displayed at 550px, probably on a retina screen with a pixel density of 2. Not likely to look good 😅 I wonder if the only really solid way to support this would be to allow control over setting a hero:
image:
file: ./hero-image.webp
width: 550 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I've noticed that when trying to provide a hero image for a page, the image loaded by Astro has url parameters specifying a fixed size (
&w=400&h=400
). This leads to the loaded image looking low quality, as it gets scaled down with a low pixel count.Here is the difference between the default, and manually removing the URL parameters from the img src after the page has loaded.
Before
After
Beta Was this translation helpful? Give feedback.
All reactions