Does the parcel-plugin-imagemin work?
See original GitHub issueHi, I found your plugin on the Internet. And I wanted to use it in my project. I read the documentation, but the plugin doesn’t work.
Here are my steps:
-
I installed the plugin for parcel (before that parsel was installed, it works).
-
I created a “imagemin.config.js” in the root of the project. This is structure of my project:
StaffMonitoring/
|---> src/
|---> dist/
|---> package.json
|---> package-lock.json
|---> imagemin.config.js
-
I used command
npm build run
and I expect to see compressed images in the folder “dist”, but there are images without compression.
Tell me, please, what is my mistake?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:23 (8 by maintainers)
Top Results From Across the Web
parcel-plugin-imagemin - npm
Parcel plugin to support image minification. Latest version: 4.0.2, ... Start using parcel-plugin-imagemin in your project by running `npm i ...
Read more >parcel-plugin-imagemin - npm Package Health Analysis - Snyk
Ensure you're using the healthiest npm packages. Snyk scans all the packages in your projects for vulnerabilities and provides automated fix advice.
Read more >Use Imagemin to compress images - web.dev
Because images can be candidates for Largest Contentful Paint (LCP), those unnecessary ... The Imagemin CLI works with 5 different plugins: ...
Read more >Does the parcel-plugin-imagemin work? - - Bountysource
Does the parcel -plugin-imagemin work? ... Hi, I found your plugin on the Internet. And I wanted to use it in my project....
Read more >What is Gulp imagemin with its Configuration and Plugin?
npm (Node Package Manager) is and does what its name infers. It is a bundle supervisor for JavaScript and “the world's biggest programming...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@DeMoorJasper
After diving dipper I’ve found out the issue and it is related to the
imagemin
not handling Windows paths properly - it relies on theglobby
package, which expects forward slashes/
, instead of the backward\
used by Windows.I tried running the tests after replacing that package with the fixed version - tests are all green and the svgs are compressed correctly. 👍
I’ll suggest the PR for
imagemin
repo and hopefully the author will consider it or provide another solution to the problem.After that this issue may be closed.
Hi, I have the same problem on Win10, image (jpg, …) are not minified 😕 with gulp / gulp-imagemin : 256ko => 95 ko, but with your plugin, same size
I use yarn@berry version and the
yarn run parcel build ...
command