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 PNG source sets #226

Open
messismore opened this issue Aug 8, 2020 · 1 comment
Open

Optimize PNG source sets #226

messismore opened this issue Aug 8, 2020 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@messismore
Copy link

Is your feature request related to a problem? Please describe.
PNG sourcesets created by responsive loader are currently not optimised. The files are up to four times the size of those handled by img-loader.

This seems to be the case with both the jimp and sharp libraries that responsive loader uses to scale images. JPGs are fine, apparently.
responsive-loader/issues/63
responsive-loader/issues/3
To mitigate this it has been suggested to optimise the files after scaling.

Describe the solution you'd like
Have Webpack optimise PNGs created by responsive-loader.

Describe alternatives you've considered
From what I understand it should be possible to extend the Webpack configuration in nuxt.config.js but I am too much of a novice to get it to work. It would benefit all users of this module if this worked out of the box.

Additional context
-

@juliomrqz juliomrqz added enhancement New feature or request help wanted Extra attention is needed labels Jan 2, 2021
@archieDeveloper
Copy link

Faced the same problem. My png file, after decreasing in resolution with responsive-loader, is increased in bytes by 3 times. Paradox. I also want to process pngquant after the responsive-loader.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants