-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
🐛 Bug: Allcontributors table images should have loading=lazy #1312
Comments
I very much like this idea (having written about how to do this in Docusaurus and helped make it the default behaviour for Docusaurus I declare an interest 😄 ) Looking at the However, the proof is in the pudding. I'm going to tweak the README on a branch and see if it works. |
So in tragic news, I don't think this is doable unless the GitHub Markdown rendered changes. Consider: I tweaked the And as the screenshot of devtools shows, the |
BTW feel free to delete the branch - don't want to clutter. More just wanted to demostrate my findings! |
The library GitHub uses for Markdown rendering seems to be: https://github.com/gjtorikian/commonmarker (If I understand https://github.com/github/markup right) Potential issue:
|
So commonmarker wraps the rust library https://github.com/kivikakk/comrak I've had a little dig through that and don't detect any special processing around images. This makes it seem likely that (as per comment above) GitHub itself does the |
I've raised a request with GitHub support to discuss whether the |
It's a requested feature, this issue cannot advance unless the following is implemented: https://github.com/orgs/community/discussions/42558 See also: https://gist.github.com/kivikakk/622b5dcf395e26c49e2334f0eb19e6f9 |
Thanks for the investigation, great finds! |
Bug Report Checklist
main
branch of the repository.Expected
Images in the allcontributors table should have
loading="lazy"
so that they don't slow down initial page load or render.Actual
I tried loading https://github.com/JoshuaKGoldberg/create-typescript-app in a throttled network connection and noticed a lot of images loading right away. They even seemed to be blocking first page render Yuck.
Additional Info
This might involve fixing on the allcontributors side?
I also don't know if this is possible in GitHub's markdown renderer... but it really should be. If it isn't, I should find a place to request it / upvote an existing request.
The text was updated successfully, but these errors were encountered: