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

Minify wash images, update font import #764

Merged
merged 2 commits into from
Dec 12, 2024
Merged

Minify wash images, update font import #764

merged 2 commits into from
Dec 12, 2024

Conversation

jamesnw
Copy link
Contributor

@jamesnw jamesnw commented Dec 10, 2024

Description

In looking at our Lighthouse scores, I found a couple small wins.

  1. Change wash images to webp format. This reduced the size significantly. (178kb to 13kb, 45kb to 6kb)
  2. Update how the web font is getting loaded. According to the embed guide, we were using a legacy mode. Moving it to an import in our CSS file increased our Lighthouse score from 76 to 96.

I think the improvement was because how the font was being loaded caused a repaint and impacted the initial Largest Contentful Paint.

Steps to test/reproduce

Check that the images and fonts load as expected.
Run Lighthouse if you are curious. (This only impacts Performance- the SEO and Best Practices ones are wonky due to the Netlify enviroment, I think)

https://deploy-preview-764--oddleventy.netlify.app/

Copy link

View diff of compiled files (may take a few minutes): https://github.com/oddbird/oddleventy-built/compare/main..lighthouse

Copy link
Member

@mirisuzanne mirisuzanne left a comment

Choose a reason for hiding this comment

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

looks good to me! I suppose the next step for fonts might be moving off typekit, if we can manage it.

@jamesnw jamesnw merged commit 010aed3 into main Dec 12, 2024
10 checks passed
@jamesnw jamesnw deleted the lighthouse branch December 12, 2024 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants