Questions tagged [grunt-contrib-imagemin]

Minify PNG, JPEG and GIF images

Grunt task to optimize PNG, JPEG and GIF images.

46 questions
1
vote
1 answer

Grunt and Imagemin does not minify images

I'm using Imagemin with Grunt, and have the following task setup in Gruntfile.js imagemin: { options: { optimizationLevel: 5, progressive: true, }, dev: { files: [{ expand: true, cwd:…
1
vote
1 answer

imagemin for gruntjs used with watch for grunt not properly watching my files

What I would like is the watcher to watch any newly added images and compress ONLY the newly added ones. I would also want it to remove the images I remove from the uncompressed folder (which is images/images/), also in the compressed one which is…
valerio0999
  • 11,458
  • 7
  • 28
  • 56
1
vote
1 answer

grunt-contrib-imagemin skipping files and folders

I'm trying to use grunt-contrib-imagemin to recursively process a directory of images. Config looks like this: imagemin: { mytarget: { options: { optimizationLevel: 7 }, files: [{ …
toby1kenobi
  • 1,609
  • 1
  • 14
  • 24
0
votes
1 answer

Grunt SyntaxError: Unexpected token

I'm trying to use Grunt but I get a SyntaxError. I can't find the solution. MacBook-Pro-van-Maarten:Project maarten$ grunt imagemin Loading "Gruntfile.js" tasks...ERROR SyntaxError: Unexpected token ; Warning: Task "imagemin" not…
0
votes
1 answer

PageSpeed suggests jpg can be compressed 31% while grunt/imagemin says "Already Optimized"?

I'm following up to an advise by google pagespeed to optimize the static/images on our website. After i integrated grunt/imagemin with the default optimizer (jpegtran for jpg) I found that many image files are indeed optimized with an average of…
Paul Bormans
  • 1,292
  • 16
  • 22
0
votes
1 answer

imagemin not minifying SVGs

I'm using imagemin with Grunt and it works as expected with PNGs/JPGs, but not with SVGs. When I add an SVG into my project, Grunt says: >> File "../public/microsite/src/img/Sketch.svg" added. Running "imagemin:dynamic" (imagemin) task Minified 0…
Mario Parra
  • 1,504
  • 3
  • 21
  • 46
0
votes
1 answer

grunt-contrib-imagemin- Development issues while using both Windows and Linux

Out application uses grunt-contrib-imagemin for minifying the images in the Angular JS development. The code for grunt-conntrib-imagemin seems to be different for Windows and Linux. The problem I am facing is, my team is doing the development on a…
coder
  • 400
  • 1
  • 7
  • 19
0
votes
1 answer

grunt imagemin doesn't move unoptimized images

I've just noticed this on a project I'm working on: say you have tons of images to compress and they sit in an images-src folder. once compressed, they go in an images folder and these are the ones you use in your project. it can happen that some…
valerio0999
  • 11,458
  • 7
  • 28
  • 56
0
votes
1 answer

GruntJS and imagemin, Is it ok to overwrite 'src'?

I have a grunt script (written by someone else) which is minify'ing images, but the the source and destination are the same folder, which to my mind appears to be overwriting the source with the minified images. Here is a section from the…
Ninjanoel
  • 2,864
  • 4
  • 33
  • 53
0
votes
0 answers

Grunt imagemin - 'optimizationLevel' not working

Everything is fine except one case is that optimizationLevel is not working. I dont get result based on optimizationLevel level change (level from 1 to 7) imagemin:{ dynamic:{ options:{ optimizationLevel: 1 …
ShibinRagh
  • 6,530
  • 4
  • 35
  • 57
0
votes
1 answer

How can I make Grunt.js imagemin to track *any* folder and possibly store images in one place?

I'm relatively new to Grunt.js, setting up is quiet easy, but now I have 2 issues: 1) First, how do you track any folder inside a given sources folder? For example, images folder may itself contain images, as well as folders with images and folders…
user3078676
0
votes
1 answer

Cannot install grunt-contrib-imagemin in Windows 8.1

I cannot install grunt-contrib-imagemin on my Windows 8.1 machine. I have Node version 0.10.33. I have npm version 1.4.28. They are both fresh installations. I was following this tutorial to setup Grunt to manage SASS, JS and images in a Laravel…
Daniel Twigg
  • 749
  • 4
  • 22
0
votes
1 answer

Warning: Error: dyld: lazy symbol binding failed: Symbol not found: _objc_autoreleasePoolPush

I'm getting an error when imagemin is run on png : Warning: Error: dyld: lazy symbol binding failed: Symbol not found: _objc_autoreleasePoolPush i'm on a macbook pro 10.6.8 I installed grunt today along with the plugin's Any help would be wonderful…
Justin
  • 215
  • 1
  • 9
0
votes
1 answer

Preventing Grunt from running in destination directory

Currently trying to figure Grunt out and the first dependency I'm configure is grunt-contrib-imagemin. My code currently looks like this: module.exports = function(grunt) { // Parse JSON grunt.initConfig({ pkg:…
PaulVO
  • 309
  • 3
  • 13
0
votes
1 answer

grunt imagemin gives : Minified 0 images..?

As I enter grunt imagemin it gives as a result : 'Minified 0 images' What I did: npm install grunt-contrib-imagemin --save-dev Installed imagemin plug-in module.exports = function(grunt) { // Project configuration. grunt.initConfig({ pkg:…