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

Add image optimization #10572

Closed
wants to merge 5 commits into from

Conversation

sumanthratna
Copy link

the first step towards implementing #10467

This PR implements image optimization via Webpack. All image optimizations are lossless; if a user wants to customize optimization then they should either eject or optimize images themselves without ejecting.

I have added a unit test (which passes)—the unoptimized image is ~66.5 KB while the optimized image is ~32.1 KB.

packages/react-scripts/package.json Outdated Show resolved Hide resolved
sumanthratna and others added 5 commits August 4, 2021 14:30
`npm install image-minimizer-webpack-plugin@^1.0.0 imagemin-gifsicle imagemin-jpegtran imagemin-optipng imagemin-svgo`

NOTE: when CRA upgrades to Webpack 5, update
image-minimizer-webpack-plugin to v2.
Co-authored-by: Ian Schmitz <[email protected]>
Co-authored-by: jasonwilliams <[email protected]>
Co-authored-by: Joseph Atkins-Turkish <[email protected]>
Co-authored-by: e-w-h <[email protected]>
Co-authored-by: Shamprasad RH <[email protected]>
Co-authored-by: James George <[email protected]>
@sumanthratna
Copy link
Author

I messed up the git history so I'm closing in favor of #11279

@sumanthratna sumanthratna deleted the image-optimization branch January 9, 2022 19:01
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.

3 participants