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

Optimizing 18 images - 12.51 MiB reduction #6429

Merged
merged 18 commits into from
Aug 8, 2018
Merged

Optimizing 18 images - 12.51 MiB reduction #6429

merged 18 commits into from
Aug 8, 2018

Conversation

genintho
Copy link
Contributor

This PR optimize the site images, using lossy algorithm. I did one of these in the past (#5349).

You might want to consider using the tool (https://www.shrink.sh) I used to generate this PR. Disclaimer, I am the author, and I wrote it exactly to solve this problem: it is too easy to forget the optimize images. The tool is triggered when new images are pushed on the master branch of a repo. Rebasing my fork with upstream triggered it.

Below is the PR description generated by the tool.


πŸ€– Reduce image sizes by 49%!

Optimized Images

# πŸ“ File Original Size New Size Savings
βœ… 16-snapshots.png 150.10 KiB 142.55 KiB -5%
βœ… interactiveSnapshot.png 128.66 KiB 109.02 KiB -15%
βœ… interactiveSnapshotUpdate.gif 805.99 KiB 511.21 KiB -36%
βœ… interactiveSnapshotDone.png 33.09 KiB 28.03 KiB -15%
βœ… airbnb.png 51.70 KiB 31.84 KiB -38%
βœ… default-demo.gif 7.25 MiB 3.82 MiB -47%
βœ… describe-demo.gif 5.26 MiB 2.48 MiB -52%
βœ… tagged-template-literal.gif 4.12 MiB 1.41 MiB -65%
βœ… test-demo.gif 4.52 MiB 2.23 MiB -50%
βœ… 23-asymmetric-matchers.png 265.32 KiB 148.20 KiB -44%
βœ… 23-async-matchers.png 179.54 KiB 99.34 KiB -44%
βœ… 23-hanging-after.png 233.85 KiB 144.74 KiB -38%
βœ… 23-hanging-before.png 190.30 KiB 117.83 KiB -38%
βœ… 23-interactive.gif 824.47 KiB 655.32 KiB -20%
βœ… 23-jest-each.png 235.91 KiB 129.32 KiB -45%
βœ… 23-new-matchers.png 295.07 KiB 167.39 KiB -43%
βœ… 23-snapshot-matchers.png 344.73 KiB 246.78 KiB -28%
βœ… 23-typeahead.gif 308.19 KiB 181.83 KiB -40%
πŸͺ Total 25.11 MiB 12.59 MiB -49%

shrink-sh bot added 18 commits June 6, 2018 03:12
51.70 KiB => 31.84 KiB  (-38%)
@codecov-io
Copy link

Codecov Report

Merging #6429 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #6429   +/-   ##
=======================================
  Coverage   63.48%   63.48%           
=======================================
  Files         227      227           
  Lines        8697     8697           
  Branches        3        4    +1     
=======================================
  Hits         5521     5521           
  Misses       3175     3175           
  Partials        1        1

Continue to review full report at Codecov.

Legend - Click here to learn more
Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data
Powered by Codecov. Last update eb096f8...ca9f4f4. Read the comment docs.

@thymikee thymikee merged commit db28956 into jestjs:master Aug 8, 2018
@merlinnot
Copy link

Maybe srcsets + modern compression formats (webp + jpeg) would work even better?

@thymikee
Copy link
Collaborator

thymikee commented Aug 8, 2018

webp is only supported in Chrome currently, so nope. srcsets are ok, but it's a burden to maintain without a CMS

@merlinnot
Copy link

I know, that’s why β€œwebp + jpeg”, you can have jpeg as a fallback using picture tag.

You don’t necessarily need a CMS, it can be generated at build time.

@thymikee
Copy link
Collaborator

thymikee commented Aug 8, 2018

CMS, scripting, you name it. However, if you're interested in bringing such functionality into our website / Docusaurus, that would be awesome πŸ˜ƒ
cc @endiliey @JoelMarcey

@merlinnot
Copy link

Sure, why not. I like Jest :)

@SimenB
Copy link
Member

SimenB commented Aug 9, 2018

The best would be to land it somehow in https://docusaurus.io/, that way Jest and all other sites using is (React, Prettier etc.) get the improvement for free

@JoelMarcey
Copy link
Contributor

@SimenB @thymikee - Hi πŸ‘‹ maybe I am not reading this thread correctly - but we added image compression in 1.1 - facebook/docusaurus@ab6bab9

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants