{"action":"created","issue":{"url":"https://api.github.com/repos/gruntjs/grunt-contrib-imagemin/issues/325","labels_url":"https://api.github.com/repos/gruntjs/grunt-contrib-imagemin/issues/325/labels{/name}","comments_url":"https://api.github.com/repos/gruntjs/grunt-contrib-imagemin/issues/325/comments","events_url":"https://api.github.com/repos/gruntjs/grunt-contrib-imagemin/issues/325/events","html_url":"https://github.com/gruntjs/grunt-contrib-imagemin/issues/325","id":111955604,"number":325,"title":"Cannot read property 'contents' of undefined","user":{"login":"cyrilepinat","id":1631004,"avatar_url":"https://avatars.githubusercontent.com/u/1631004?v=3","gravatar_id":"","url":"https://api.github.com/users/cyrilepinat","html_url":"https://github.com/cyrilepinat","followers_url":"https://api.github.com/users/cyrilepinat/followers","following_url":"https://api.github.com/users/cyrilepinat/following{/other_user}","gists_url":"https://api.github.com/users/cyrilepinat/gists{/gist_id}","starred_url":"https://api.github.com/users/cyrilepinat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyrilepinat/subscriptions","organizations_url":"https://api.github.com/users/cyrilepinat/orgs","repos_url":"https://api.github.com/users/cyrilepinat/repos","events_url":"https://api.github.com/users/cyrilepinat/events{/privacy}","received_events_url":"https://api.github.com/users/cyrilepinat/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":22,"created_at":"2015-10-17T10:26:45Z","updated_at":"2015-11-09T10:49:43Z","closed_at":null,"body":"Hi, I cannot figure out what is happening here, and how to fix it. When I run `grunt imagemin -vd --stack`\r\n\r\nI get that : \r\n\r\n        Options: interlaced, optimizationLevel=3, progressive, cache=false\r\n\tFatal error: Cannot read property 'contents' of undefined\r\n\tTypeError: Cannot read property 'contents' of undefined\r\n\t    at /home/cyril/dev/workspace/client/node_modules/grunt-contrib-imagemin/tasks/imagemin.js:61:54\r\n\t    at ConcatStream.<anonymous> (/home/cyril/dev/workspace/client/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/concat-stream/index.js:36:43)\r\n\t    at ConcatStream.emit (events.js:129:20)\r\n\t    at finishMaybe (/home/cyril/dev/workspace/client/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js:502:14)\r\n\t    at endWritable (/home/cyril/dev/workspace/client/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js:512:3)\r\n\t    at ConcatStream.Writable.end (/home/cyril/dev/workspace/client/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js:477:5)\r\n\t    at DuplexWrapper.onend (/home/cyril/dev/workspace/client/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/stream-combiner2/node_modules/readable-stream/lib/_stream_readable.js:539:10)\r\n\t    at DuplexWrapper.g (events.js:199:16)\r\n\t    at DuplexWrapper.emit (events.js:129:20)\r\n\t    at endReadableNT (/home/cyril/dev/workspace/client/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/stream-combiner2/node_modules/readable-stream/lib/_stream_readable.js:944:12)\r\n\t    at afterTick (/home/cyril/dev/workspace/client/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/stream-combiner2/node_modules/readable-stream/node_modules/process-nextick-args/index.js:11:8)\r\n\t    at process._tickCallback (node.js:355:11)\r\n \r\n\r\nCould you help me please ?\r\n \r\nmy config is : \r\n\r\n     grunt-contrib-imagemin : 0.9.4\r\n     imagemin : 3.2.0\r\n\r\nand in Gruntfile.js : \r\n\r\n     imagemin: {\r\n\t  dist: {\r\n\t    options: {\r\n\t      cache:false\r\n\t    },\r\n\t    files: [{\r\n\t      expand: true,\r\n\t      cwd: '<%= yeoman.app %>/assets',\r\n\t      src: ['**/*.{png,jpg,jpeg,gif}'],\r\n\t      dest: '<%= yeoman.dist %>/assets'\r\n\t    }]\r\n\t  }\r\n\t},"},"comment":{"url":"https://api.github.com/repos/gruntjs/grunt-contrib-imagemin/issues/comments/155026775","html_url":"https://github.com/gruntjs/grunt-contrib-imagemin/issues/325#issuecomment-155026775","issue_url":"https://api.github.com/repos/gruntjs/grunt-contrib-imagemin/issues/325","id":155026775,"user":{"login":"errok","id":8195360,"avatar_url":"https://avatars.githubusercontent.com/u/8195360?v=3","gravatar_id":"","url":"https://api.github.com/users/errok","html_url":"https://github.com/errok","followers_url":"https://api.github.com/users/errok/followers","following_url":"https://api.github.com/users/errok/following{/other_user}","gists_url":"https://api.github.com/users/errok/gists{/gist_id}","starred_url":"https://api.github.com/users/errok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/errok/subscriptions","organizations_url":"https://api.github.com/users/errok/orgs","repos_url":"https://api.github.com/users/errok/repos","events_url":"https://api.github.com/users/errok/events{/privacy}","received_events_url":"https://api.github.com/users/errok/received_events","type":"User","site_admin":false},"created_at":"2015-11-09T10:49:43Z","updated_at":"2015-11-09T10:49:43Z","body":"+1 for merging @psergei fix"}}