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

perf: optimize image assets #288

Merged
merged 1 commit into from Aug 2, 2022
Merged

perf: optimize image assets #288

merged 1 commit into from Aug 2, 2022

Conversation

harish-sethuraman
Copy link
Member

@harish-sethuraman harish-sethuraman commented Jul 31, 2022

Similar to eslint/eslint#16170

Ran

svgo -r -f ./src/assets/images
chart.svg:
Done in 147 ms!
78.642 KiB - 52.9% = 37.066 KiB

squiggly-line.svg:
Done in 9 ms!
2.909 KiB - 51% = 1.427 KiB

arrow-top-right.svg:
Done in 3 ms!
0.227 KiB - 12.5% = 0.198 KiB

chevron-down.svg:
Done in 1 ms!
0.229 KiB - 17.9% = 0.188 KiB

copy.svg:
Done in 2 ms!
0.736 KiB - 41.4% = 0.432 KiB

correct.svg:
Done in 0 ms!
0.365 KiB - 8.6% = 0.334 KiB

discord.svg:
Done in 15 ms!
3.313 KiB - 64.3% = 1.183 KiB

facebook.svg:
Done in 4 ms!
0.48 KiB - 24.8% = 0.361 KiB

features-list-icon.svg:
Done in 1 ms!
0.287 KiB - 11.9% = 0.253 KiB

github-icon-mono.svg:
Done in 4 ms!
1.292 KiB - 36.5% = 0.82 KiB

github-small.svg:
Done in 5 ms!
1.171 KiB - 39.1% = 0.713 KiB

github-img.svg:
Done in 2 ms!
1.159 KiB - 30.2% = 0.809 KiB

github.svg:
Done in 6 ms!
1.126 KiB - 24.7% = 0.848 KiB

incorrect.svg:
Done in 4 ms!
0.373 KiB - 8.6% = 0.341 KiB

languages.svg:
Done in 6 ms!
1.49 KiB - 8.7% = 1.36 KiB

link.svg:
Done in 22 ms!
1.021 KiB - 65.8% = 0.349 KiB

menu.svg:
Done in 4 ms!
0.214 KiB - 10.5% = 0.191 KiB

linkedin.svg:
Done in 2 ms!
0.821 KiB - 36% = 0.525 KiB

minus-circle.svg:
Done in 0 ms!
0.311 KiB - 21.1% = 0.245 KiB

npm.svg:
Done in 2 ms!
0.66 KiB - 26.5% = 0.485 KiB

open-collectione-mono.svg:
Done in 5 ms!
1.014 KiB - 32.3% = 0.687 KiB

opencollective-img.svg:
Done in 4 ms!
0.831 KiB - 18% = 0.682 KiB

twitter.svg:
Done in 2 ms!
0.879 KiB - 44.4% = 0.488 KiB

brand-colors.svg:
Done in 0 ms!
0.234 KiB - 10.4% = 0.21 KiB

eslint-logo-white.svg:
Done in 8 ms!
4.404 KiB - 34.9% = 2.867 KiB

1password-icon.svg:
Done in 40 ms!
8.651 KiB - 46.7% = 4.612 KiB

algolia-icon.svg:
Done in 5 ms!
1.1 KiB - 2.4% = 1.073 KiB

search.svg:
Done in 1 ms!
0.402 KiB - 35.2% = 0.261 KiB

1password.svg:
Done in 50 ms!
12.278 KiB - 36.1% = 7.84 KiB

algolia.svg:
Done in 11 ms!
4.346 KiB - 0.3% = 4.331 KiB

netlify-icon.svg:
Done in 16 ms!
9.297 KiB - 56.4% = 4.052 KiB

_placeholder-avatar.svg:
Done in 3 ms!
0.721 KiB - 19.9% = 0.577 KiB

netlify.svg:
Done in 14 ms!
12.464 KiB - 53.1% = 5.846 KiB

eslint-logo-color.svg:
Done in 8 ms!
4.403 KiB - 34.4% = 2.889 KiB

github-large.svg:
Done in 9 ms!
1.079 KiB - 45.2% = 0.591 KiB

money-spenditure-graph.svg:
Done in 51 ms!
28.718 KiB - 33.5% = 19.096 KiB

google.svg:
Done in 3 ms!
1.202 KiB - 67.5% = 0.391 KiB

arrow-right.svg:
Done in 3 ms!
0.223 KiB - 13.2% = 0.193 KiB

learn-more-arrow.svg:
Done in 2 ms!
0.269 KiB - 18.9% = 0.218 KiB

plus-circle.svg:
Done in 0 ms!
0.318 KiB - 20.9% = 0.252 KiB

arrow-left.svg:
Done in 6 ms!
0.221 KiB - 11.9% = 0.194 KiB

@netlify
Copy link

netlify bot commented Jul 31, 2022

Deploy Preview for new-eslint ready!

Name Link
🔨 Latest commit 735225d
🔍 Latest deploy log https://app.netlify.com/sites/new-eslint/deploys/62e62be8b9aa2f000990bc73
😎 Deploy Preview https://deploy-preview-288--new-eslint.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 settings.

@netlify
Copy link

netlify bot commented Jul 31, 2022

Deploy Preview for es-eslint ready!

Name Link
🔨 Latest commit 735225d
🔍 Latest deploy log https://app.netlify.com/sites/es-eslint/deploys/62e62be8b9aa2f000990bc78
😎 Deploy Preview https://deploy-preview-288--es-eslint.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 settings.

@netlify
Copy link

netlify bot commented Jul 31, 2022

Deploy Preview for ja-eslint ready!

Name Link
🔨 Latest commit 735225d
🔍 Latest deploy log https://app.netlify.com/sites/ja-eslint/deploys/62e62be8b9aa2f000990bc7d
😎 Deploy Preview https://deploy-preview-288--ja-eslint.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 settings.

@netlify
Copy link

netlify bot commented Jul 31, 2022

Deploy Preview for hi-eslint ready!

Name Link
🔨 Latest commit 735225d
🔍 Latest deploy log https://app.netlify.com/sites/hi-eslint/deploys/62e62be8b73c4300089cf01e
😎 Deploy Preview https://deploy-preview-288--hi-eslint.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 settings.

@netlify
Copy link

netlify bot commented Jul 31, 2022

Deploy Preview for cn-eslint ready!

Name Link
🔨 Latest commit 735225d
🔍 Latest deploy log https://app.netlify.com/sites/cn-eslint/deploys/62e62be82208b400080d99de
😎 Deploy Preview https://deploy-preview-288--cn-eslint.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 settings.

@netlify
Copy link

netlify bot commented Jul 31, 2022

Deploy Preview for pt-br-eslint ready!

Name Link
🔨 Latest commit 735225d
🔍 Latest deploy log https://app.netlify.com/sites/pt-br-eslint/deploys/62e62be896060600083e71eb
😎 Deploy Preview https://deploy-preview-288--pt-br-eslint.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 settings.

@netlify
Copy link

netlify bot commented Jul 31, 2022

Deploy Preview for fr-eslint ready!

Name Link
🔨 Latest commit 735225d
🔍 Latest deploy log https://app.netlify.com/sites/fr-eslint/deploys/62e62be8e62a5c0009078dd5
😎 Deploy Preview https://deploy-preview-288--fr-eslint.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 settings.

Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

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

Nice! Thanks.

I wonder if there’s a way to automate this?

@nzakas nzakas merged commit 04487a2 into main Aug 2, 2022
@nzakas nzakas deleted the minify-svg-assets branch August 2, 2022 01:17
@harish-sethuraman
Copy link
Member Author

How about adding it to pre commit with lint staged? We can optimize the staged assets during linting?

@amareshsm
Copy link
Member

Tried adding svgo command to pre commit lint - #292

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants