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

Optimise images on the website #3779

Merged
merged 9 commits into from
May 20, 2024
Merged

Optimise images on the website #3779

merged 9 commits into from
May 20, 2024

Conversation

owenatgov
Copy link
Contributor

@owenatgov owenatgov commented May 3, 2024

Change

A very rudimentary running of the images in our website through ImageOptim. Responding very late to a (now out of date) performance audit of pages on our website that contain images/media 👈🏻 only accessible to design system team members.

A light contribution to #2403

Notes

Testing the build of this branch against main, we shed roughly 2mb.

I kept compression rates fairly conservative. Lossy minification was enabled but most pngs and jpgs retain 90% of their quality with the exception of much larger images where I dropped to 80% for pngs and 75% for jpgs.

There are better ways we can improve website weight eg: some of these images could probably be code examples. We could also spend more time looking into marked post processing to automate the marking up of images with performance enhancing attributes and potentially even converting images into better formats like webp. This is a quick win for now though.

@owenatgov owenatgov requested a review from a team May 3, 2024 11:13
Copy link

netlify bot commented May 3, 2024

You can preview this change here:

Name Link
🔨 Latest commit 50edc70
🔍 Latest deploy log https://app.netlify.com/sites/govuk-design-system-preview/deploys/6634c6bee35d910008c45c50
😎 Deploy Preview https://deploy-preview-3779--govuk-design-system-preview.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.

@owenatgov owenatgov merged commit a2fe65a into main May 20, 2024
13 checks passed
@owenatgov owenatgov deleted the optimise-images branch May 20, 2024 09:38
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.

None yet

2 participants