-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Responsive images #1051
base: main
Are you sure you want to change the base?
Responsive images #1051
Conversation
|
||
For that reason, this RFC includes image service crop support as a goal, though it is not a blocker for the initial feature. | ||
|
||
#### New `ImageTransform` properties |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a technical detail, but it might be the perfect time to add ImageTransform
to the interfaces we allow users to extend (in packages/astro/src/types/public/extendables.ts
in next
) so that image services can define some other props they support.
I've updated the implementation details part of the RFC based on things I've discovered while prototyping. |
Hey! I‘m excited to see work being picked up again on the image components. I read the rfc and don’t really understand how values for the sizes attribute are created when „responsive“ layout is used. Is there JS being injected or how does the component know how large the image is show at different breakpoints? |
@carlcs It generates a sizes attribute based on the assumption that it's the full width of the screen when downsized. You'd need to pass your own if this is incorrect. |
@ascorbic that‘s perfect if we can still set sizes manually! You might want to change docs a bit because this part is a bit misleading.
|
Summary
Implements opinionated best practices in Astro Image, generating srcset, sizes and styles automatically.
Links