bumptech / bumptech/glide

Bug: can't have support animation (and sometimes even normal image) of GIF, AVIF, WEBP at the same time

Open
#5,477 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
35k
Forks
6.2k
Avg merge
1d 11h
Merged PRs (30d)
8

Description

I use these:

```
// https://github.com/bumptech/glide https://github.com/zjupure/GlideWebpDecoder
// https://bumptech.github.io/glide/doc/download-setup.html#kotlin---ksp https://bumptech.github.io/glide/int/avif.html
val glideVersion = "4.16.0"
implementation("com.github.zjupure:webpdecoder:2.6.${glideVersion}")
implementation("com.github.bumptech.glide:glide:${glideVersion}")
ksp ("com.github.bumptech.glide:ksp:${glideVersion}")
implementation("com.github.bumptech.glide:avif-integration:${glideVersion}")
```

I've noticed that for some reason, I can't support animation of each of them , always.
Not only that, but I think in some cases, loading simple images might have bad results (not showing, or having bad decoding).
Sometimes even animated GIF stops playing and only has the first frame....

This was tested on Pixel 6 with Android 15, and on emulator with API 30.

Attached sample to prove that:

1. When all exist, only animated WEBP is showing. The rest are static.
2. When AVIF is missing, on Android 13 and below of course it won't work (AVIF is supported only from Android 14) and it actually causes a crash without letting me handle it via the listener. Removing the AVIF code, Android 13 and below can handle both animations of WEBP and GIF just fine.
On Android 15, the animated AVIF won't work. Animated GIF and animated WEBP do appear fine though. Also even normal AVIF images decoding might result in weird artefacts.
3. When WEBP is missing, all images are static. No animation at all.

Please fix this.
I want to use various kinds of images and animations.

[Glide Test.zip](https://github.com/user-attachments/files/18732685/Glide.Test.zip)

Contributor guide

Open the contributing guide

Research direction

Start by running the attached Glide Test.zip with Glide 4.16.0, the WebP decoder, and AVIF integration across the reported Android versions. Compare animated and static GIF, WebP, and AVIF loading, then trace the Glide decoder integrations; done means all supported formats decode correctly, animations remain animated, and unsupported AVIF does not crash the load or produce artefacts.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java, kotlin
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.