question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Does the parcel-plugin-imagemin work?

See original GitHub issue

Hi, 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:

  1. I installed the plugin for parcel (before that parsel was installed, it works).

  2. 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

  3. 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:open
  • Created 3 years ago
  • Reactions:2
  • Comments:23 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
VitalyKrenelcommented, May 23, 2020

@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 the globby 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.

3reactions
gouzcommented, Apr 24, 2020

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found