Closed Grawl closed 4 years ago
The second undefined
in that error message is the image file path:
// node_modules/image-size/lib/index.js
throw new TypeError('unsupported file type: ' + type + ' (file: ' + filepath + ')');
So I assume that the lib just couldn't find the image.
I also checked, your code works on my machine. I'm closing this ticket since it doesn't seem like a bug in posthtml-img-autosize
. Feel free to re-open if needed.
its broken image. I fix it using imgproxy
My script looks like this:
I have
try/catch
here and.catch
in promise, what I am doing wrong?But I have
TypeError: unsupported file type: undefined (file: undefined)
on one of my pages.This image causes this error: