Questions tagged [imagemin]

91 questions
1
vote
1 answer

How to minimize only changed images with imagemin-webpack-plugin?

Im using imagemin-webpack-plugin to minimize images in my project. It only runs when I run npm build. But, each time i do that, it minimizes all the images over again, which is unnecessary. So, I want for it to just minimize the images that were…
taylor018
  • 351
  • 2
  • 16
1
vote
0 answers

How to compress image with imagemin?

Am I misusing it? let imgBuff = /* my image buffer is here */ console.log("file type", fileType(imgBuff)); // -> debug { ext: 'jpg', mime: 'image/jpeg' } console.log("before!", imgBuff.toString("ascii").length); // -> before! 28991 imagemin …
ciaoben
  • 3,138
  • 4
  • 27
  • 42
1
vote
1 answer

Unable to compress large file with imageminMozjpeg?

I have been making a server on node which can take image files and upload on disk after compressing it. However, image with smaller size are being compressed and image with large size like 10mb or so gives the following error. { Error: Error in…
Alpit Anand
  • 1,213
  • 3
  • 21
  • 37
1
vote
1 answer

ember-cli-imagemin lossyPNG ImageMin.pngquant is not a function

I'm trying to enable the lossyPNG property in the ember-cli-imagmin addon to create a small file size for my .pngs. My EmberApp in ember-cli-build.js includes imagemin like so: imagemin: { interlaced: true, optimizationLevel: 3, progressive:…
wwwuser
  • 6,282
  • 8
  • 52
  • 64
1
vote
1 answer

How to use imagemin to compress images and busboy

I want to use the following library to compress images https://github.com/imagemin/imagemin The problem is when the user uploads using a form, how do I plug in the file details from the form to the image min plugin? Like for example, if the file…
Brown Limie
  • 2,249
  • 3
  • 17
  • 18
1
vote
1 answer

Gulp imagemin not working for SVG images

Hi i have a little bit of a problem in my Gulp configuration for images, my gulp task is supposed to minify all images in the resources folder and then place the minified version in the public directory, however only the PNG images are being…
João Serra
  • 243
  • 4
  • 14
1
vote
1 answer

"image-min" is not working within "multer" in node js

In node-js I am using multer package to upload the image. To compress the images I am using image-min. var multer = require('multer'); var imagemin = require('image-min'); app.use(multer({ dest : './public/images/profiles/uploads/', rename :…
Shanthi
  • 686
  • 3
  • 11
  • 22
1
vote
1 answer

Watch folder on server for new images to compress

I have a server and it gets a lot of image uploads. The app uploading the images is based in PHP. However, I want to use Node to watch the upload folder, then run imagemin on any new images. I was thinking I would use npm packages 'watch' and…
Sean
  • 1,758
  • 3
  • 20
  • 34
1
vote
1 answer

gulp-imagemin - how to disregard directory structures?

I'm using gulp-imagemin in it's basic form gulp.task('image', function() { return gulp.src('./images/*') .pipe(imagemin({ progressive: true, svgoPlugins: [{removeViewBox: false}], use: [pngquant()] })) …
elzi
  • 5,442
  • 7
  • 37
  • 61
1
vote
1 answer

Getting error when running grunt-contrib-imagemin

I'm getting a permissions error -- or so it seems -- when I try to run the grunt-contrib-imagemin script. I installed grunt-contrib-imagemin like so: npm install --save-dev grunt-contrib-imagemin My node and npm are installed in my local user root…
fraxture
  • 5,113
  • 4
  • 43
  • 83
0
votes
0 answers

Webpack-ImageMinimizerPlugin select files

How to include or exclude files from the compression process? I'm using the ImageMinimizerPlugin together with the CopyPlugin as follows: ImageMinimizerPlugin configuration: const imgMinParams = { include: PATHS.src +…
A Bren
  • 1
  • 1
0
votes
0 answers

Image-minimizer-webpack-plugin keep aspect-ratio

I'm using the Image-minimizer-webpack-plugin like this: generator: [ { type: 'asset', preset: 'webp', implementation: ImageMinimizerPlugin.sharpGenerate, options: { encodeOptions: { webp: { quality: 10, …
A Bren
  • 1
  • 1
0
votes
0 answers

can't import imagemin with ES in nodej V16.15

I'm trying to use image to save the images in webp format, but the npm documentation to use it does an import imagemin from "imagemin" but nodejs v16.15.0 but it throws a syntax error on import import imageminWebp from 'imagemin-webp'; (async () =>…
0
votes
1 answer

How can I process more than 500 MB worth of images?

Code works fine when it's processing less than 500 MB worth of images. (I'm trying to do +25 GB worth) Is there a way to modify the code to get it to work with a larger quantity of images? I get an error that looks like…
Howard
  • 3,648
  • 13
  • 58
  • 86
0
votes
1 answer

How to fix the warning: 'No plugins found for `imagemin`. Please read documentation.'

I'm trying to get my head around Webpack and building a Typescript project from scratch. Even though the project runs on dev and build, it seems I wrote something wrong in the webpack.config.js because I'm getting this error with every image I'm…
Marco Mazzai
  • 95
  • 2
  • 16