Skip to content
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

@astro/image should call out usage of content-visibility attribute #1517

Closed
susickypavel opened this issue Sep 9, 2022 · 5 comments
Closed
Assignees
Labels
should this be documented? Need to figure out whether this is something to add to documentation or not tsc guidance required from Technical Steering Committee

Comments

@susickypavel
Copy link

susickypavel commented Sep 9, 2022

Hi 👋

Today, I've spent a large amount of time debugging an issue about image not rendering when coming to viewport. After checking my code for flaws in animation, I found out that the issue was usage of content-visibility property which should alter the default behaviour of image rendering. It should be mentioned in some way that this property is declared by default by Picture/Image.

@susickypavel susickypavel changed the title @astrojs/image @astro/image should call out usage of content-visibility attribute Sep 9, 2022
@delucis
Copy link
Member

delucis commented Sep 11, 2022

Tagging in @tony-sull for an opinion here so we can discuss what kind of docs this might need.

@delucis delucis added should this be documented? Need to figure out whether this is something to add to documentation or not tsc guidance required from Technical Steering Committee labels Sep 11, 2022
@susickypavel
Copy link
Author

susickypavel commented Sep 11, 2022

I think it could be batched together in some callout. I'd like to see something like Image and Picture components are optimized by default by the integration, so attributes like loading, decoding, and property content-visibility have optimized defaults (but they could lead to weird edge cases). Since lazy loading images in the initial viewport is wasteful and harms the website's FCP/LCP, I'd say such a callout could be helpful.

@sarah11918
Copy link
Member

11 days is a long time in Astro Image Integration land! 😅

I will make sure that I touch base on this with @tony-sull as developments are happening rapidly, and we'll keep this on everyone's radar!

@sarah11918 sarah11918 self-assigned this Sep 22, 2022
@Jutanium Jutanium self-assigned this Oct 6, 2022
@tony-sull
Copy link
Contributor

Sorry for the late reply, this got lost in my GitHub notifications somewhere along the way 😞

It might make sense for us to just remove that style on <Picture /> - we don't add any other styling by default, no reason we can't leave that up to users to include if their layout needs it 🤔

@delucis
Copy link
Member

delucis commented Oct 24, 2022

Sounds like this is a non-docs issue then, so hope it’s OK if I close this here for now with the intention that it gets resolved upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
should this be documented? Need to figure out whether this is something to add to documentation or not tsc guidance required from Technical Steering Committee
Projects
None yet
Development

No branches or pull requests

5 participants