Skip to content

Comments

Feature: AVIF support#6288

Merged
WithoutPants merged 9 commits intostashapp:developfrom
Gykes:Avif-support
Nov 27, 2025
Merged

Feature: AVIF support#6288
WithoutPants merged 9 commits intostashapp:developfrom
Gykes:Avif-support

Conversation

@Gykes
Copy link
Collaborator

@Gykes Gykes commented Nov 17, 2025

From what I can tell ffmpeg does most of the heavy lifting for AVIF so this is a pretty small addition. I updated DLNA as well to be able to access this addition as well.

fixes: #1729

@Gykes Gykes requested a review from feederbox826 November 17, 2025 22:44
@DogmaDragon
Copy link
Collaborator

While this works for adding/displaying images, it creates some errors when generate image thumbnails is enabled.

Using images from https://convertico.com/samples/avif/ for the test.
Tested on Floor browser (has native AVIF support).

2025-11-18 01:09:01Info    Scan finished (3.1804959s)
2025-11-18 01:09:01Info    Adding <redacted>\Test\AVIF\Convertico\the-girl-with-the-convertico-dragon-tattoo-avif.avif to gallery <redacted>\Test\AVIF\Convertico
2025-11-18 01:09:01Info    <redacted>\Test\AVIF\Convertico\the-girl-with-the-convertico-dragon-tattoo-avif.avif doesn't exist. Creating new image...
2025-11-18 01:09:01Info    Calculating fingerprints for <redacted>\Test\AVIF\Convertico\the-girl-with-the-convertico-dragon-tattoo-avif.avif ...
2025-11-18 01:09:01Error   [generator] getting thumbnail for image <redacted>\Test\AVIF\Convertico\sunset-avif-lossless-12bit.avif: %!w(*fmt.wrapError=&{error running ffmpeg command <-hide_banner -v error -y -i - -vf scale=640:640:force_original_aspect_ratio=decrease -c:v mjpeg -frames:v 1 -q:v 5 -f image2pipe - -f mjpeg>: exit status 0xbebbb1b7 0xc0006b2a20})
2025-11-18 01:09:01Info    Scan finished (3.1804959s)
2025-11-18 01:09:01Info    Adding <redacted>\Test\AVIF\Convertico\the-girl-with-the-convertico-dragon-tattoo-avif.avif to gallery <redacted>\Test\AVIF\Convertico
2025-11-18 01:09:01Info    <redacted>\Test\AVIF\Convertico\the-girl-with-the-convertico-dragon-tattoo-avif.avif doesn't exist. Creating new image...
2025-11-18 01:09:01Info    Calculating fingerprints for <redacted>\Test\AVIF\Convertico\the-girl-with-the-convertico-dragon-tattoo-avif.avif ...
2025-11-18 01:09:01Error   [generator] getting thumbnail for image <redacted>\Test\AVIF\Convertico\sunset-avif-lossless-12bit.avif: %!w(*fmt.wrapError=&{error running ffmpeg command <-hide_banner -v error -y -i - -vf scale=640:640:force_original_aspect_ratio=decrease -c:v mjpeg -frames:v 1 -q:v 5 -f image2pipe - -f mjpeg>: exit status 0xbebbb1b7 0xc0006b2a20})
2025-11-18 01:09:01Info    Adding <redacted>\Test\AVIF\Convertico\sunset-avif-lossless-12bit.avif to gallery <redacted>\Test\AVIF\Convertico
2025-11-18 01:09:01Info    <redacted>\Test\AVIF\Convertico\sunset-avif-lossless-12bit.avif doesn't exist. Creating new image...
2025-11-18 01:09:00Info    Calculating fingerprints for <redacted>\Test\AVIF\Convertico\sunset-avif-lossless-12bit.avif ...
2025-11-18 01:09:00Error   [generator] getting thumbnail for image <redacted>\Test\AVIF\Convertico\convertico-dragon-hd-hq-12bit.avif: %!w(*fmt.wrapError=&{error running ffmpeg command <-hide_banner -v error -y -i - -vf scale=640:640:force_original_aspect_ratio=decrease -c:v mjpeg -frames:v 1 -q:v 5 -f image2pipe - -f mjpeg>: exit status 0xbebbb1b7 0xc000c89e60})
2025-11-18 01:09:00Info    Adding <redacted>\Test\AVIF\Convertico\convertico-dragon-hd-hq-12bit.avif to gallery <redacted>\Test\AVIF\Convertico
2025-11-18 01:09:00Info    <redacted>\Test\AVIF\Convertico\convertico-dragon-hd-hq-12bit.avif doesn't exist. Creating new image...
2025-11-18 01:08:59Info    Calculating fingerprints for <redacted>\Test\AVIF\Convertico\convertico-dragon-hd-hq-12bit.avif ...
2025-11-18 01:08:59Info    Adding <redacted>\Test\AVIF\Convertico\blue-avif-8bit.avif to gallery <redacted>\Test\AVIF\Convertico
2025-11-18 01:08:59Info    <redacted>\Test\AVIF\Convertico\blue-avif-8bit.avif doesn't exist. Creating new image...
2025-11-18 01:08:59Info    Calculating fingerprints for <redacted>\Test\AVIF\Convertico\blue-avif-8bit.avif ...
2025-11-18 01:08:59Info    Adding <redacted>\Test\AVIF\Convertico\blue-avif-12bit.avif to gallery <redacted>\Test\AVIF\Convertico
2025-11-18 01:08:59Info    <redacted>\Test\AVIF\Convertico\blue-avif-12bit.avif doesn't exist. Creating new image...
2025-11-18 01:08:59Info    Calculating fingerprints for <redacted>\Test\AVIF\Convertico\blue-avif-12bit.avif ...
2025-11-18 01:08:59Info    Adding <redacted>\Test\AVIF\Convertico\blue-avif-10bit.avif to gallery <redacted>\Test\AVIF\Convertico
2025-11-18 01:08:59Info    <redacted>\Test\AVIF\Convertico\blue-avif-10bit.avif doesn't exist. Creating new image...
2025-11-18 01:08:59Info    Calculating fingerprints for <redacted>\Test\AVIF\Convertico\blue-avif-10bit.avif ...
2025-11-18 01:08:59Error   [generator] getting thumbnail for image <redacted>\Test\AVIF\Convertico\avif-sample.avif: %!w(*fmt.wrapError=&{error running ffmpeg command <-hide_banner -v error -y -i - -vf scale=640:640:force_original_aspect_ratio=decrease -c:v mjpeg -frames:v 1 -q:v 5 -f image2pipe - -f mjpeg>: exit status 0xbebbb1b7 0xc0011b0020})
2025-11-18 01:08:58Info    Adding <redacted>\Test\AVIF\Convertico\avif-sample.avif to gallery <redacted>\Test\AVIF\Convertico
2025-11-18 01:08:58Info    Creating folder-based gallery for <redacted>\Test\AVIF\Convertico
2025-11-18 01:08:58Info    <redacted>\Test\AVIF\Convertico\avif-sample.avif doesn't exist. Creating new image...
2025-11-18 01:08:58Info    Calculating fingerprints for <redacted>\Test\AVIF\Convertico\avif-sample.avif ...
2025-11-18 01:08:58Info    Finished adding files to queue. 7 files queued

When browsing the images from inside a gallery it constantly prints errors in the log.

2025-11-18 01:13:59Error   stderr: Cannot determine format of input 0:0 after EOF
[vf#0:0 @ 00000250647a1340] Task finished with error code: -1094995529 (Invalid data found when processing input)
[vf#0:0 @ 00000250647a1340] Terminating thread with return code -1094995529 (Invalid data found when processing input)
[vost#0:0/mjpeg @ 0000025064796cc0] Could not open encoder before EOF
[vost#0:0/mjpeg @ 0000025064796cc0] Task finished with error code: -22 (Invalid argument)
[vost#0:0/mjpeg @ 0000025064796cc0] Terminating thread with return code -22 (Invalid argument)
[out#0/image2pipe @ 0000025064794240] Nothing was written into output file, because at least one of its streams received no packets.
2025-11-18 01:13:59Error   error generating thumbnail for <redacted>\Test\AVIF\Convertico\convertico-dragon-hd-hq-12bit.avif: error running ffmpeg command <-hide_banner -v error -y -i - -vf scale=640:640:force_original_aspect_ratio=decrease -c:v mjpeg -frames:v 1 -q:v 5 -f image2pipe - -f mjpeg>: exit status 0xbebbb1b7
2025-11-18 01:13:58Error   stderr: Cannot determine format of input 0:0 after EOF
[vf#0:0 @ 0000016dca68cd80] Task finished with error code: -1094995529 (Invalid data found when processing input)
[vf#0:0 @ 0000016dca68cd80] Terminating thread with return code -1094995529 (Invalid data found when processing input)
[vost#0:0/mjpeg @ 0000016dca6852c0] Could not open encoder before EOF
[vost#0:0/mjpeg @ 0000016dca6852c0] Task finished with error code: -22 (Invalid argument)
[vost#0:0/mjpeg @ 0000016dca6852c0] Terminating thread with return code -22 (Invalid argument)
[out#0/image2pipe @ 0000016dca6a6d40] Nothing was written into output file, because at least one of its streams received no packets.
2025-11-18 01:13:58Error   error generating thumbnail for <redacted>\Test\AVIF\Convertico\sunset-avif-lossless-12bit.avif: error running ffmpeg command <-hide_banner -v error -y -i - -vf scale=640:640:force_original_aspect_ratio=decrease -c:v mjpeg -frames:v 1 -q:v 5 -f image2pipe - -f mjpeg>: exit status 0xbebbb1b7
2025-11-18 01:13:58Error   stderr: Cannot determine format of input 0:0 after EOF
[vf#0:0 @ 000001f7126826c0] Task finished with error code: -1094995529 (Invalid data found when processing input)
[vf#0:0 @ 000001f7126826c0] Terminating thread with return code -1094995529 (Invalid data found when processing input)
[vost#0:0/mjpeg @ 000001f712696580] Could not open encoder before EOF
[vost#0:0/mjpeg @ 000001f712696580] Task finished with error code: -22 (Invalid argument)
[vost#0:0/mjpeg @ 000001f712696580] Terminating thread with return code -22 (Invalid argument)
[out#0/image2pipe @ 000001f712682cc0] Nothing was written into output file, because at least one of its streams received no packets.
2025-11-18 01:13:58Error   error generating thumbnail for <redacted>\Test\AVIF\Convertico\the-girl-with-the-convertico-dragon-tattoo-avif.avif: error running ffmpeg command <-hide_banner -v error -y -i - -vf scale=640:640:force_original_aspect_ratio=decrease -c:v mjpeg -frames:v 1 -q:v 5 -f image2pipe - -f mjpeg>: exit status 0xbebbb1b7
2025-11-18 01:13:57Error   stderr: Cannot determine format of input 0:0 after EOF
[vf#0:0 @ 000001cf885e26c0] Task finished with error code: -1094995529 (Invalid data found when processing input)
[vf#0:0 @ 000001cf885e26c0] Terminating thread with return code -1094995529 (Invalid data found when processing input)
[vost#0:0/mjpeg @ 000001cf885f6580] Could not open encoder before EOF
[vost#0:0/mjpeg @ 000001cf885f6580] Task finished with error code: -22 (Invalid argument)
[vost#0:0/mjpeg @ 000001cf885f6580] Terminating thread with return code -22 (Invalid argument)
[out#0/image2pipe @ 000001cf885e2cc0] Nothing was written into output file, because at least one of its streams received no packets.
2025-11-18 01:13:57Error   error generating thumbnail for <redacted>\Test\AVIF\Convertico\blue-avif-10bit.avif: error running ffmpeg command <-hide_banner -v error -y -i - -vf scale=640:640:force_original_aspect_ratio=decrease -c:v mjpeg -frames:v 1 -q:v 5 -f image2pipe - -f mjpeg>: exit status 0xbebbb1b7
2025-11-18 01:13:57Error   stderr: Cannot determine format of input 0:0 after EOF
[vf#0:0 @ 000002106d8126c0] Task finished with error code: -1094995529 (Invalid data found when processing input)
[vf#0:0 @ 000002106d8126c0] Terminating thread with return code -1094995529 (Invalid data found when processing input)
[vost#0:0/mjpeg @ 000002106d826580] Could not open encoder before EOF
[vost#0:0/mjpeg @ 000002106d826580] Task finished with error code: -22 (Invalid argument)
[vost#0:0/mjpeg @ 000002106d826580] Terminating thread with return code -22 (Invalid argument)
[out#0/image2pipe @ 000002106d812cc0] Nothing was written into output file, because at least one of its streams received no packets.
2025-11-18 01:13:57Error   error generating thumbnail for <redacted>\Test\AVIF\Convertico\blue-avif-12bit.avif: error running ffmpeg command <-hide_banner -v error -y -i - -vf scale=640:640:force_original_aspect_ratio=decrease -c:v mjpeg -frames:v 1 -q:v 5 -f image2pipe - -f mjpeg>: exit status 0xbebbb1b7
2025-11-18 01:13:56Error   stderr: Cannot determine format of input 0:0 after EOF
[vf#0:0 @ 00000261aa1726c0] Task finished with error code: -1094995529 (Invalid data found when processing input)
[vf#0:0 @ 00000261aa1726c0] Terminating thread with return code -1094995529 (Invalid data found when processing input)
[vost#0:0/mjpeg @ 00000261aa186580] Could not open encoder before EOF
[vost#0:0/mjpeg @ 00000261aa186580] Task finished with error code: -22 (Invalid argument)
[vost#0:0/mjpeg @ 00000261aa186580] Terminating thread with return code -22 (Invalid argument)
[out#0/image2pipe @ 00000261aa172cc0] Nothing was written into output file, because at least one of its streams received no packets.
2025-11-18 01:13:56Error   error generating thumbnail for <redacted>\Test\AVIF\Convertico\blue-avif-8bit.avif: error running ffmpeg command <-hide_banner -v error -y -i - -vf scale=640:640:force_original_aspect_ratio=decrease -c:v mjpeg -frames:v 1 -q:v 5 -f image2pipe - -f mjpeg>: exit status 0xbebbb1b7
2025-11-18 01:13:55Error   stderr: Cannot determine format of input 0:0 after EOF
[vf#0:0 @ 000001f4a3981340] Task finished with error code: -1094995529 (Invalid data found when processing input)
[vf#0:0 @ 000001f4a3981340] Terminating thread with return code -1094995529 (Invalid data found when processing input)
[vost#0:0/mjpeg @ 000001f4a3976cc0] Could not open encoder before EOF
[vost#0:0/mjpeg @ 000001f4a3976cc0] Task finished with error code: -22 (Invalid argument)
[vost#0:0/mjpeg @ 000001f4a3976cc0] Terminating thread with return code -22 (Invalid argument)
[out#0/image2pipe @ 000001f4a3974240] Nothing was written into output file, because at least one of its streams received no packets.
2025-11-18 01:13:55Error   error generating thumbnail for <redacted>\Test\AVIF\Convertico\avif-sample.avif: error running ffmpeg command <-hide_banner -v error -y -i - -vf scale=640:640:force_original_aspect_ratio=decrease -c:v mjpeg -frames:v 1 -q:v 5 -f image2pipe - -f mjpeg>: exit status 0xbebbb1b7
2025-11-18 01:13:54Error   stderr: Cannot determine format of input 0:0 after EOF
[vf#0:0 @ 0000018dd83d1340] Task finished with error code: -1094995529 (Invalid data found when processing input)
[vf#0:0 @ 0000018dd83d1340] Terminating thread with return code -1094995529 (Invalid data found when processing input)
[vost#0:0/mjpeg @ 0000018dd83c6cc0] Could not open encoder before EOF
[vost#0:0/mjpeg @ 0000018dd83c6cc0] Task finished with error code: -22 (Invalid argument)
[vost#0:0/mjpeg @ 0000018dd83c6cc0] Terminating thread with return code -22 (Invalid argument)
[out#0/image2pipe @ 0000018dd83c4240] Nothing was written into output file, because at least one of its streams received no packets.
2025-11-18 01:13:54Error   error generating thumbnail for <redacted>\Test\AVIF\Convertico\avif-sample.avif: error running ffmpeg command <-hide_banner -v error -y -i - -vf scale=640:640:force_original_aspect_ratio=decrease -c:v mjpeg -frames:v 1 -q:v 5 -f image2pipe - -f mjpeg>: exit status 0xbebbb1b7

@Gykes
Copy link
Collaborator Author

Gykes commented Nov 17, 2025

Ah, I forgot the pipe for avif. FFMpeg cant autodetect it so gotta make it.

@feederbox826
Copy link
Collaborator

pipe might also be related to #6277

@Gykes
Copy link
Collaborator Author

Gykes commented Nov 18, 2025

@DogmaDragon WIth my recent commit I got no errors using the same images you linked but on WaterFox. Feederbox is doing Feederbox things to try and make it even better but I think it works as is for now.

@feederbox826
Copy link
Collaborator

feederbox826 commented Nov 18, 2025

While this works for adding/displaying images, it creates some errors when generate image thumbnails is enabled.

Instead of providing a solution to this bug, have you considered abandoning windows altogther and/or installing vips instead? :')))))))

@DogmaDragon
Copy link
Collaborator

While this works for adding/displaying images, it creates some errors when generate image thumbnails is enabled.

Instead of providing a solution to this bug, have you considered abandoning windows altogther and/or installing vips instead? :')))))))

Soon enough Windows will be gone from my life once extended security updates gets cut off.
And I do use ImageMagick for my image operations. 😆

@DogmaDragon
Copy link
Collaborator

@Gykes no errors in the logs/console, but some of the thumbnails are not generated/shown correctly.
Tested with Brave (Chromium) and Floorp (Firefox).

I censured images since I'm unsure about their license.
image

@Gykes
Copy link
Collaborator Author

Gykes commented Nov 18, 2025

@Gykes no errors in the logs/console, but some of the thumbnails are not generated/shown correctly. Tested with Brave (Chromium) and Floorp (Firefox).

I censured images since I'm unsure about their license. image

Without logs it's hard for me to make a determination. I'll look further into it tonight and hopefully have it fixed tomorrow.

@Gykes
Copy link
Collaborator Author

Gykes commented Nov 18, 2025

@DogmaDragon Seems like I was able to get it to work with my recent commit on waterfox. Im also not getting anymore errors in the logs (They came back with some of my recent changes). I downloaded all the avif files from that website that you linked for testing.

Screenshot 2025-11-18 at 09-18-46 Images Stash

@feederbox826
Copy link
Collaborator

feederbox826 commented Nov 19, 2025

I'm not sure if it's worth merging and dealing with these issues if we have to pull in outside dependencies, when I strongly suspect it's something to do with how we pass the bytestream to ffmpeg or a regression upstream in avif where the codec is not being detected

I appreciate the effort, please don't misunderstand but I think it might not be worth the effort to keep chasing this lead for now until we figure out where in ffmpeg it's failing

@Gykes
Copy link
Collaborator Author

Gykes commented Nov 19, 2025

I'm not sure if it's worth merging and dealing with these issues if we have to pull in outside dependencies, when I strongly suspect it's something to do with how we pass the bytestream to ffmpeg or a regression upstream in avif where the codec is not being detected

I appreciate the effort, please don't misunderstand but I think it might not be worth the effort to keep chasing this lead for now until we figure out where in ffmpeg it's failing

I agree with you, so don't worry :P

@feederbox826
Copy link
Collaborator

Looked into it more, avifs are not actually images under the hood, that's why ffmpeg identifies it as a MOOV. They are all single-frame videos which means they cannot be read from stdin. @WithoutPants not sure if this is worth moving forwards with if you can only write to tmp

@feederbox826
Copy link
Collaborator

Follow up to /tmp comment, docker persists /tmp between contianer restarts as it writes to overlayfs like it would any other file. In order to truly handle it like a tmpfile, we would need to also add deleting the file after we're done reading from /tmp.

I don't have any horse in the race but I think there is value to handlding any type of file just with a /tmp switch that can be added (maybe with some warning?)

@WithoutPants
Copy link
Collaborator

My preferred approach would be to use ffmpeg to handle avif files, rather than introducing more dependencies. This does leave handling avif files in zip files. Since as feeder mentioned above ffmpeg identifies avif files as video, I think we should just document that avif files in zip files are not currently supported. Dealing with video(-like) files in zips should be solved in a separate PR.

@Gykes
Copy link
Collaborator Author

Gykes commented Nov 25, 2025

I will probably just revert back then to my pre zip stuff. I'll get with DD to see how he wants to handle documentation.

@Gykes
Copy link
Collaborator Author

Gykes commented Nov 26, 2025

Per WPs request I went ahead and reverted my zip support changes and updated docs. My current implementation allowed me to add single file avifs, previews were generated, and no error in logs as seen above.

@DogmaDragon
Copy link
Collaborator

I was able to test this again using individual images:

@Gykes Gykes requested a review from WithoutPants November 26, 2025 23:59
@WithoutPants
Copy link
Collaborator

As near as I can tell, only commit 3c6c65e is actually necessary. I'm going to try verifying on windows to determine if there are any ffmpeg errors there, but on my linux machine with ffmpeg it generates the thumbnails ok.

@Gykes
Copy link
Collaborator Author

Gykes commented Nov 27, 2025

I believe that was the initial one that DD tested and received errors due to the pipe. If i'm not mistaken we need to do it via filepath instead of pipe for avif so that part is needed as well I believe.

@WithoutPants
Copy link
Collaborator

I believe that was the initial one that DD tested and received errors due to the pipe. If i'm not mistaken we need to do it via filepath instead of pipe for avif so that part is needed as well I believe.

Yeah, that's what I'm trying to reproduce.

@WithoutPants
Copy link
Collaborator

Alright, I've done some testing against develop (modified to provide extra logging) on Windows.

Using ffmpeg version 4.4.0, I receive the following error:

ERRO[2025-11-27 12:53:13] [generator] getting thumbnail for image ..\sfw\media\avif\sunset-avif-lossless-12bit.avif: error running ffmpeg command <-hide_banner -v error -y -i - -vf scale=640:640:force_original_aspect_ratio=decrease -c:v mjpeg -frames:v 1 -q:v 5 -f image2pipe - -f mjpeg>: exit status 1
DEBU[2025-11-27 12:53:13] [generator] error output: [mov,mp4,m4a,3gp,3g2,mj2 @ 000002592acbe340] moov atom not found
 ipe:: Invalid data found when processing input

Using ffmpeg version 6.1.1, thumbnails generated successfully.
Using ffmpeg version 8.0.1 (which notably is what you get when downloading on windows, instead of 6.1), got the following error:

ERRO[2025-11-27 12:56:47] [generator] getting thumbnail for image ..\sfw\media\avif\sunset-avif-lossless-12bit.avif: error running ffmpeg command <-hide_banner -v error -y -i - -vf scale=640:640:force_original_aspect_ratio=decrease -c:v mjpeg -frames:v 1 -q:v 5 -f image2pipe - -f mjpeg>: exit status 0xbebbb1b7
DEBU[2025-11-27 12:56:47] [generator] error output: [vf#0:0 @ 000002bf6c03d540] Cannot determine format of input 0:0 after EOF
[vf#0:0 @ 000002bf6c03d540] Task finished with error code: -1094995529 (Invalid data found when processing input)
[vf#0:0 @ 000002bf6c03d540] Terminating thread with return code -1094995529 (Invalid data found when processing input)
[vost#0:0/mjpeg @ 000002bf6c03c840] [enc:mjpeg @ 000002bf6c01c4c0] Could not open encoder before EOF
[vost#0:0/mjpeg @ 000002bf6c03c840] Task finished with error code: -22 (Invalid argument)
[vost#0:0/mjpeg @ 000002bf6c03c840] Terminating thread with return code -22 (Invalid argument)
[out#0/image2pipe @ 000002bf6c036780] Nothing was written into output file, because at least one of its strea s received no packets.

I get the same errors running on linux with ffmpeg version 8.0.1. So that's a very roundabout way of arriving at the same conclusion. Piping doesn't work. I'll take another look at the code.

@DogmaDragon
Copy link
Collaborator

DogmaDragon commented Nov 27, 2025

To add: I was testing using ffmpeg-7.0.2-essentials_build.

}

// ffmpegImageThumbnailFromPath generates a thumbnail from a file path (used for AVIF which can't be piped)
func (e *ThumbnailEncoder) ffmpegImageThumbnailFromPath(inputPath string, maxSize int) ([]byte, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: ffmpegImageThumbnailPath is a bit less wordy.

@feederbox826
Copy link
Collaborator

Using ffmpeg version 4.4.0, I receive the following error:

AVIF support dropped in 5.1 LTS
https://stackoverflow.com/a/73030929

@Gykes
Copy link
Collaborator Author

Gykes commented Nov 27, 2025

I removed a lot of the unused stuff. I also added the zip check logic into the image scan.go. If it detects that an avif file is in a zip then it throws a warn log and bails on that file.

Warning 
Skipping AVIF image in zip file: /Users/gykes/Desktop/AVIF/Archive 22.02.57.zip/the-girl-with-the-convertico-dragon-tattoo-avif.avif
2025-11-26 22:31:34
Warning 
Skipping AVIF image in zip file: /Users/gykes/Desktop/AVIF/Archive 22.02.57.zip/sunset-avif-lossless-12bit.avif```

@Gykes Gykes requested a review from WithoutPants November 27, 2025 06:35
@WithoutPants
Copy link
Collaborator

I also added the zip check logic into the image scan.go. If it detects that an avif file is in a zip then it throws a warn log and bails on that file.

I think we should still do the check in GetThumbnail and error out (as unsupported) if its in a zip file as a sanity check.

@WithoutPants WithoutPants added the feature Pull requests that add a new feature label Nov 27, 2025
@WithoutPants WithoutPants added this to the Version 0.30.0 milestone Nov 27, 2025
@WithoutPants WithoutPants merged commit 90d1b2d into stashapp:develop Nov 27, 2025
2 checks passed
@feederbox826
Copy link
Collaborator

10 minutes ✅

@WithoutPants
Copy link
Collaborator

I think we should still do the check in GetThumbnail and error out (as unsupported) if its in a zip file as a sanity check.

It looks like the change introduced here was to warn and return, which results in a corrupted file entry, since it hasn't been decorated as an image file. I'll make a fix to return an error instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Pull requests that add a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Support AVIF

4 participants