waschinski / photo-stream

Self-hosted, super simple photo stream
https://github.com/waschinski/photo-stream
MIT License
449 stars 70 forks source link

Uppercase file extension ".JPG" does not process correctly #10

Closed jessecrouch closed 2 years ago

jessecrouch commented 3 years ago

Hi, when I add a file such as "PA289387.JPG" to photos/original, the directory and index.html will be created for it, but the image file itself will not be processed. Here's the server log:

[2021-08-31 21:16:51] ERROR /photos/tint/PA289387-65ba1d.JPG' not found. [2021-08-31 21:16:51] ERROR/photos/thumbnail/PA289387-ccf4df.JPG' not found. [2021-08-31 21:16:53] ERROR `/photos/large/PA289387-686656.JPG' not found.

and in photo-stream\_site\photos, the image does not show under any of the directories.

When I change the extension to lowercase "PA289387.jpg" the file is processed immediately and everything works as expected.

I realize I could pre-process all my file names to be lowercase, but it would be cool if photo-stream could accept all casing. Tried to figure out how to do this myself, but I don't understand enough about Jekyll plugins. Any help appreciated!

waschinski commented 3 years ago

Thanks for reporting this issue. While I can't reproduce it on my Mac Mini, I can do so on my Chromebook running Linux on aarch64. My guess right now is that some dependency (libvips?) is outdated.

waschinski commented 3 years ago

So this was a hard nut to crack and is actually a real bug which is just not occurring on MacOS because APFS is not case-sensitive by default.

My current fix is a plugin which basically does what you did manually, changing the file extension to lowercase. Though I'd rather not touch the photos/original folder and have the fix only mess with the images in _site. But I tried changing the plugin to deal with the destination folders instead of the source folder and use a different hook to no avail.

waschinski commented 3 years ago

Please check the latest release and let me know if this is working for you.

waschinski commented 2 years ago

So lets assume it's working. :)