image-lambda
image-lambda copied to clipboard
Reduce doesn't seem to work
Hi,
if in the config.json file I leave the reduce section I get this error:
{
"errorMessage": "spawn /var/task/node_modules/mozjpeg/vendor/cjpeg ENOENT",
"errorType": "Error",
"stackTrace": [
"exports._errnoException (util.js:870:11)",
"Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)",
"onErrorNT (internal/child_process.js:344:16)",
"nextTickCallbackWith2Args (node.js:437:9)",
"process._tickDomainCallback (node.js:392:17)"
]
}
Example:
working config file:
{
"resizes": [
{
"width": 100,
"sourceDir": "images/uploads",
"targetBucket": "example",
"targetDir": "images/100w",
"ACL": "public-read"
},
{
"height": 200,
"sourceDir": "images/uploads",
"targetBucket": "example",
"targetDir": "images/200h",
"ACL": "public-read"
}
]
}
not working config file:
{
"reduce": {
"sourceDir": "images/uploads",
"targetBucket": "example",
"targetDir": "images/reduce",
"ACL": "public-read"
},
"resizes": [
{
"width": 100,
"sourceDir": "images/uploads",
"targetBucket": "example",
"targetDir": "images/100w",
"ACL": "public-read"
},
{
"height": 200,
"sourceDir": "images/uploads",
"targetBucket": "example",
"targetDir": "images/200h",
"ACL": "public-read"
}
]
}
Any ideas? Thanks