danm/image-hash

Problem with getting file extension

Opened this issue · 1 comments

The current get extension process incorrectly detects periods in file paths.
You should either use the extname of the path module or determine by the trailing period and fix the processing.

https://github.com/danm/image-hash/blob/master/src/index.ts#L90-L102

Can you provide an example?
This should be working fine for files with periods in the file path. 🤔

As you can see even with periods in the path we still get jpg out.

image