Closed joranrood closed 5 years ago
Trying to set the format option to "raw" or { "id": "raw" } yields the following error:
"raw"
{ "id": "raw" }
Message: File `portrait.png`: Unsupported output format function(filePath) { var extname = path.extname(filePath); switch (extname) { case '.jpeg': case '.jpg': case '.jpe': return 'jpeg'; case '.png': return 'png'; case '.webp': return 'webp'; default: return 'unsupported'; } }
This is because the format function is passed to the Sharp .toBuffer() method instead of the actual format value. This PR fixes the issue.
format
.toBuffer()
Trying to set the format option to
"raw"
or{ "id": "raw" }
yields the following error:This is because the
format
function is passed to the Sharp.toBuffer()
method instead of the actual format value. This PR fixes the issue.