bpatrik / pigallery2

A fast directory-first photo gallery website, with rich UI, optimized for running on low resource servers (especially on raspberry pi)
http://bpatrik.github.io/pigallery2/
MIT License
1.76k stars 202 forks source link

AVIF support #858

Open TupiNUMBooR opened 6 months ago

TupiNUMBooR commented 6 months ago

AVIF files become more popular nowadays and it's very efficient to keep a gallery in avifs because of size. Do you plan to support avif in the gallery?

I hope you don't mind that I opened a new issue, though there is an existing one, https://github.com/bpatrik/pigallery2/issues/350 , but it is old and closed.

martadinata666 commented 6 months ago

Should be supported on edge-alpine tag, then taking image https://github.com/link-u/avif-sample-images it rendered fine. You just need to add "avif" format to config extension "Settings > Photo > Supported Photo Format", remove database, and rescan files.

Edit: Some of image not rendering, Im not really sure if image just weird or janky but all the foxes rendered fine.

TupiNUMBooR commented 6 months ago

Wow, it works, thank you! Though I noticed thumbnails generate in some weird square way:

Screenshot_20240329_002636

Anyway, it works, so closing the issue.

bpatrik commented 3 months ago

wait what, the app supports AVIF? @martadinata666 Do you know if its an alpine specialty? If not we can add it to the supported formats by default. (of course after checking if it actually true)

bpatrik commented 3 months ago

ahh If I understand correctly we have avif, if we have heic so that is why it works on alpine.

issue on sharp side: https://github.com/lovell/sharp/issues/2289

i guess we can add to the configdiagnostic: runDiagnostics() a test for heic and avif and remove those from the support extension list on startup if we cannot use them with sharp. Making these extension kinda auto discovered.

martadinata666 commented 3 months ago

alpine will do avif, on debian side need upgrade base to bookworm. That also affect the heic things.