Questions tagged [imagemin]
91 questions
0
votes
1 answer
How to use image-minimizer-webpack-plugin in an Angular application
I have been trying to install, configure and use image-minimizer-webpack-plugin with an Angular 13 application, but I have found no clear, complete and up to date example of how to do this.

Andrei Diaconescu
- 557
- 4
- 14
0
votes
1 answer
Node - getting ENOMEM error when spawning child process
I'm running Node 14 on an AWS ECS machine with has 5120 CPU and 8192 Memory.
At times when running on heavy load (either compressing large number of images using imagemin or copying files from S3 to the local machine using S3 sync) I get the ENOMEM…

David Faizulaev
- 4,651
- 21
- 74
- 124
0
votes
1 answer
Can't build mozjpeg on Alpine Linux
I spent hours trying different node images and install different packages but nothing helped. On the host system I don't seem to have any issue when running npm run dev, but when using Docker (Alpine Linux) I get this output:
#33 72.29 npm WARN…

xshapira
- 355
- 4
- 13
0
votes
1 answer
imagemin - code executes but nothing seems to happens
I'm trying to compress an image in Node 14 with Typescript and using imagemin.
I took the examples I found online and run the code, but nothing seems to happen, it finishes without any errors.
The output is empty as well.
imagemin version 7.0.1
node…

David Faizulaev
- 4,651
- 21
- 74
- 124
0
votes
2 answers
Convert Images to webp with Node
I have a script to convert images to node, but am having an issue where I receive the successful message, yet nothing is output.
import imagemin from "imagemin";
import webp from "imagemin-webp";
var outputFolder = "./FSS-assets/webp"; …

elke_wtf
- 887
- 1
- 14
- 30
0
votes
0 answers
How to compress images at build time
In angular which npm package should i use to compress image (assets) at build time and also upload it to server
TYIA

nupur
- 91
- 1
- 1
- 11
0
votes
1 answer
imageminJpegTran add-on rotates an image
What I am doing is compressing a buffer I got from a file and writing a compressed one to memory again. What happens is that square and rectangle images are compressed correctly, but vertical ones are being rotated. Are there any options I can pass…

Aika Sat
- 167
- 3
- 11
0
votes
1 answer
NodeJS stream image from web, convert to WebP
I need to stream images from the web (using a dummy image here) which are in jpg format and then convert them to WebP. This is a one at a time conversation (not bulk)
I have the following code which pulls an image and saves it as a .jpg…

Adam
- 19,932
- 36
- 124
- 207
0
votes
2 answers
Is it possible to compress an image that has been converted from base64 string to binary?
I have an app that should create a thumbnail from large images. So I need to compress the image and for that I'm using the package imagemin.
I get the input from the user as a base64 string, and then on my server, I convert it using…

Danubio Müller
- 139
- 1
- 5
0
votes
2 answers
nodejs choosing between JIMP and MOZJPEG
I was wondering if there is a blaring reason to use jimp vs. imagemin-mozjpeg for compressing jpegs (I am already using both imagemin and jimp in my project already, imagemin-webp to serve next gen images, and jimp to convert pngs to jpegs in rare…

Daniel
- 1,392
- 1
- 5
- 16
0
votes
0 answers
Error on trying to execute recursive command on CMD Windows 10
I'm trying to use a recursive command to minify images on my project, but when i execute the command, it give this error:
"The parameter command is still specified"
The command is:
find . -name "*.jpg" -exec imagemin {}/* --out-dir={}/* \;
What is…

Raphael Cordeiro
- 101
- 1
0
votes
1 answer
How to use plugin options with imagemin-cli?
I'm trying to use imagemin-cli for npm scripts, but there is no documentation for using plugin options.
The plugin I want to use is svgo and the option is removeDimensions=true, how would this look as an npm scripts command?
This is an example of a…

harrypujols
- 2,264
- 3
- 19
- 30
0
votes
0 answers
imaginemin-jpegoptim not compressing to size
I'm using imaginmin with imaginmin-jpegoptim, but it seems like jpegoptim isn't being properly utilized. My file size before is 390kb, but after conversion it's 285kb, even though I specified it to be 10kb.
Here's the code:
const imagemin =
…

A. L
- 11,695
- 23
- 85
- 163
0
votes
2 answers
imagemin plugin throwing ENOENT error on aws lambda
I created a lambda function on aws using imangemin and imagemin-optipng nodejs plugin but it is returning me below error:
error: spawn /var/task/node_modules/optipng-bin/vendor/optipng ENOENT
var aws = require('aws-sdk');
var s3 = new aws.S3()
var…

Yousuf Abbas
- 1
- 2
0
votes
2 answers
Nodejs imagemin how do I pass in the list of files to process
Trying to get imagemin to work in Nodejs. This is my code:
var imagemin = require('imagemin');
var imageminPngquant = require('imagemin-pngquant');
var PNGImages = ['images/image1.png', 'images/image2.png'];
imagemin(PNGImages, 'build', {
…

Strontium_99
- 1,771
- 6
- 31
- 52