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

Use WEBP images to make things faster #509

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

PeterJCLaw
Copy link
Member

This moves some of the heavier images, mostly on the homepage to support WEBP where browsers can do so. Along the way it introduces helpers for working with multiple images (by size and those with WEBP) and establishes a conventions for derived WEBP images' names.

Fixes #382

Size savings checked by eyeballing the local sizes plus checking .currentSrc on the DOM nodes.

https://pagespeed.web.dev/analysis/https-studentrobotics-org/k3zp02z6p1?form_factor=mobile was my starting point for where we can get benefits.

These were converted at 20% quality:

$ convert -quality 20 @ @.20pc.webp

20% quality seems plenty for these (the quality is still pretty
good) and as these are used behind a title and a colour gradient
this seems likely to be completely fine for most usages.
Relies on the user having installed ImageMagick.
These images were all created using the script introduced previously.
These photos of individuals are fairly large files for what they
are, so making the available in WEBP should save visitors some
download size. Created with the same script introduced previously.
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.

Investigate using WebP for images
1 participant