Skip to content

Reduce landing page load times and network usage by losslessly optimising & lazy-loading images #1061

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

mediremi
Copy link
Contributor

I've reduced by about half both the number of requests & data usage of the landing page's initial load 🚀

Gzipped, this comes out to 585kb vs 1.12mb. Uncompressed, it's 1.66mb vs 2.55mb:

Before After
image image

Changes

  • The Instapainting and Vite SVG logos contained base64 encoded PNGs. I replaced the Instapainting SVG (312kb) with its embedded PNG (16kb), and replaced the Vite PNG-in-SVG (76kb) with its official SVG logo (1.2kb).
  • Used oxipng to losslessly optimise PNGs with oxipng -o 4 --strip safe public/**/**.png
  • Used svgo to optimises SVGs with npx svgo -r public/static
  • Lazy load fixed-height images by setting loading="lazy"

Copy link

vercel bot commented Jun 29, 2025

@mediremi is attempting to deploy a commit to the ReScript Association Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant