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

Updated OSS Logo to WebP #3187

Closed
wants to merge 2 commits into from
Closed

Updated OSS Logo to WebP #3187

wants to merge 2 commits into from

Conversation

GeekBoySupreme
Copy link

Motivation

The Lighthouse Performance of Docusaurus was significantly lagging at 73. Shifting from PNG to WebP led to a gain of 6.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

NA

Related PRs

#NA

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Aug 1, 2020
@docusaurus-bot
Copy link
Contributor

docusaurus-bot commented Aug 1, 2020

Deploy preview for docusaurus-2 ready!

Built with commit 0a2d21c

https://deploy-preview-3187--docusaurus-2.netlify.app

Copy link
Contributor

@yangshun yangshun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks but you didn't change the file extension in the footer, how can it have improved?

@GeekBoySupreme
Copy link
Author

Thanks but you didn't change the file extension in the footer, how can it have improved?

Hey, thanks for pointing this out. I seemed to have missed the last commit in my local. Apologies. Pushed the commit to replace the png with webp in the footer.

@slorber
Copy link
Collaborator

slorber commented Aug 1, 2020 via email

@slorber
Copy link
Collaborator

slorber commented Aug 3, 2020

Hi and thanks for this PR

https://www.keycdn.com/support/webp-browser-support#webp-browser-support

According to what I see, WebP can't be adopted as is because WebP is only supported by 80% of browsers

If we want to use webp we need to fallback to regular images for browsers not supporting webp.

https://css-tricks.com/using-webp-images/

<picture>
  <source srcset="img/imageOptimized.webp" type="image/webp">
  <img src="img/imageFallback.jpg" alt="Alt Text!">
</picture>

Worth exploring, loading=lazy on images
https://addyosmani.com/blog/lazy-loading/

I think we could apply this lazy loading on images of the footer for all D2 sites, directly in the theme btw

@slorber slorber marked this pull request as draft August 3, 2020 14:09
@slorber
Copy link
Collaborator

slorber commented Aug 20, 2020

thanks,

closing for now, but willing to reopen if a better solution is provided

@slorber slorber closed this Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants