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

polish(theme): MDX images should use async decoding #9470

Merged
merged 1 commit into from
Jan 12, 2024

Conversation

sanjaiyan-dev
Copy link
Contributor

This pull request adds the decoding="async" attribute to the <img /> HTML tag, enhancing image loading performance. This implementation is inspired by the default implementation of the Next.js image component, which prioritizes efficient and fast image loading.

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Oct 30, 2023
@netlify
Copy link

netlify bot commented Oct 30, 2023

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit 3b00580
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/653f541b2c7d63000849b293
😎 Deploy Preview https://deploy-preview-9470--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions
Copy link

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🟠 60 🟢 97 🟢 100 🟢 100 🟠 89 Report
/docs/installation 🟠 53 🟢 98 🟢 100 🟢 100 🟠 89 Report
/docs/category/getting-started 🟠 68 🟢 100 🟢 100 🟢 90 🟠 89 Report
/blog 🟠 53 🟢 100 🟢 100 🟢 90 🟠 89 Report
/blog/preparing-your-site-for-docusaurus-v3 🟠 54 🟢 97 🟢 100 🟢 100 🟠 89 Report
/blog/tags/release 🟠 87 🟢 100 🟢 100 🟠 80 🟠 89 Report
/blog/tags 🟠 66 🟢 100 🟢 100 🟢 90 🟠 89 Report

@sanjaiyan-dev
Copy link
Contributor Author

@sanjaiyan-dev
Copy link
Contributor Author

👀

@slorber slorber changed the title Optimizing Image Loading: Introducing decoding="async" to <img /> Tag 🖼 polish(theme): MDX images should use async decoding Jan 12, 2024
@slorber slorber added pr: polish This PR adds a very minor behavior improvement that users will enjoy. to backport This PR is planned to be backported to a stable version of Docusaurus labels Jan 12, 2024
@slorber
Copy link
Collaborator

slorber commented Jan 12, 2024

thanks

I read on the subject and this seems like a reasonable change
Many interesting refs here: https://core.trac.wordpress.org/ticket/53232

Note: this PR took time to merge not because the code was bad, but because you didn't really justify the change and explained the tradeoff. We don't do changes because Next.js use them bindly, we make our own judgement ;)

@slorber slorber merged commit e189978 into facebook:main Jan 12, 2024
31 of 32 checks passed
@sanjaiyan-dev sanjaiyan-dev deleted the sanjaiyan-optimize-im,age branch January 13, 2024 04:00
@sanjaiyan-dev
Copy link
Contributor Author

thanks

I read on the subject and this seems like a reasonable change Many interesting refs here: https://core.trac.wordpress.org/ticket/53232

Note: this PR took time to merge not because the code was bad, but because you didn't really justify the change and explained the tradeoff. We don't do changes because Next.js use them bindly, we make our own judgement ;)

Welcome, and I apologize for not providing the correct explanation.

@slorber
Copy link
Collaborator

slorber commented Feb 1, 2024

Unfortunately this change leads to flakiness in our Argos visual tests (#9805)

I hope we'll not have to revert it

@sanjaiyan-dev
Copy link
Contributor Author

Unfortunately this change leads to flakiness in our Argos visual tests (#9805)

I hope we'll not have to revert it

Hi @slorber, I am sincerely sorry for the inconvenience. I will do my best to find a solution for this from my side.

@slorber
Copy link
Collaborator

slorber commented Feb 1, 2024

no problem, that was worth trying 😄 we'll find a solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: polish This PR adds a very minor behavior improvement that users will enjoy. to backport This PR is planned to be backported to a stable version of Docusaurus
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants