In index.js, the file extension is used to determine whether the file is supported by lqip. It is later used to get the mime type of the file.
The problem is that you can't use lqip to process files without extensions. I'm running into this issue dealing with uploaded files processed by formidable. Yes, I could rename the file first, but if the file is on a network share it may be necessary to copy and unlink in order to rename a file.
A couple potential solutions are (1) get the mime type from the file itself, or (2) allow passing the mime type as a parameter to lqip.base64.
In index.js, the file extension is used to determine whether the file is supported by lqip. It is later used to get the mime type of the file.
The problem is that you can't use lqip to process files without extensions. I'm running into this issue dealing with uploaded files processed by formidable. Yes, I could rename the file first, but if the file is on a network share it may be necessary to copy and unlink in order to rename a file.
A couple potential solutions are (1) get the mime type from the file itself, or (2) allow passing the mime type as a parameter to
lqip.base64
.