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

Optimize images in README #40

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

runofthemillgeek
Copy link
Contributor

Noticed that images in the README of this project are way too large and hence slows down page load to this repo. I converted them into webp which has reduced the size dramatically while mostly preserving the quality needed:

❯ git branch --show-current
main
❯ l
Permissions Size User     Date Modified Name
.rw-r--r--  1.1M sangeeth 30 Oct 01:12  1.png
.rw-r--r--  1.1M sangeeth 30 Oct 01:12  2.png
.rw-r--r--  1.2M sangeeth 30 Oct 01:12  3.png
.rw-r--r--   55k sangeeth 30 Oct 01:12  banner-light.png
.rw-r--r--  644k sangeeth 30 Oct 01:12  screenshot.png
.rw-r--r--  598k sangeeth 30 Oct 01:12  tn.png
❯ gco chore/optimize-readme-images
Switched to branch 'chore/optimize-readme-images'
Your branch is up to date with 'origin/chore/optimize-readme-images'.
❯ l
Permissions Size User     Date Modified Name
.rw-r--r--  234k sangeeth 30 Oct 01:12  1.webp
.rw-r--r--  228k sangeeth 30 Oct 01:12  2.webp
.rw-r--r--  318k sangeeth 30 Oct 01:12  3.webp
.rw-r--r--  9.3k sangeeth 30 Oct 01:12  banner-light.webp
.rw-r--r--  168k sangeeth 30 Oct 01:12  screenshot.webp
.rw-r--r--  126k sangeeth 30 Oct 01:12  tn.webp

This should also make it easier to do shallow clones of this repo but it might be worthwhile cleaning up the large images in older commits to make it faster to do a full clone. But that's a bigger task and would need force pushes.

@tomfran
Copy link
Owner

tomfran commented Oct 29, 2024

Nice work, I'll take care of force pushing if it's not too destructive.

@tomfran
Copy link
Owner

tomfran commented Oct 30, 2024

Wait I saw that you changed the urls in the README, they are like this so https://themes.gohugo.io/themes/typo/ can render them correctly. Please change them to the raw path. Also, now that I think about this, I hope webp can be rendered correctly on that website.

@runofthemillgeek
Copy link
Contributor Author

Ah, my bad. I had a feeling that could be the case too. Sure thing, will fix that.

I believe rendering shouldn't be affected but the user must be using a newer browser with webp support which looks great these days: https://caniuse.com/?search=webp

@runofthemillgeek runofthemillgeek force-pushed the chore/optimize-readme-images branch from 55d2339 to 977001f Compare October 30, 2024 19:39
@runofthemillgeek
Copy link
Contributor Author

@tomfran updated it. Tested render by changing the extension to .png locally so once webp files are there, should reflect that.

@tomfran tomfran merged commit 4a4290b into tomfran:main Oct 30, 2024
tomfran added a commit that referenced this pull request Oct 30, 2024
tomfran added a commit that referenced this pull request Oct 30, 2024
@runofthemillgeek runofthemillgeek deleted the chore/optimize-readme-images branch October 30, 2024 20:55
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.

2 participants