Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with getting file extension #52

Open
ghost opened this issue Aug 27, 2023 · 1 comment
Open

Problem with getting file extension #52

ghost opened this issue Aug 27, 2023 · 1 comment

Comments

@ghost
Copy link

ghost commented Aug 27, 2023

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

@ImLunaHey
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant