diff --git a/app/src/main/kotlin/org/fossify/gallery/extensions/Context.kt b/app/src/main/kotlin/org/fossify/gallery/extensions/Context.kt index 9438687f3..4af68520a 100644 --- a/app/src/main/kotlin/org/fossify/gallery/extensions/Context.kt +++ b/app/src/main/kotlin/org/fossify/gallery/extensions/Context.kt @@ -540,8 +540,9 @@ fun Context.loadImageBase( options.optionalTransform(WebpDrawable::class.java, WebpDrawableTransformation(FitCenter())) } - // animation is only supported without rounded corners - if (animate && roundCorners == ROUNDED_CORNERS_NONE) { + // animation is only supported without rounded corners and the file must be a GIF or WEBP. + // Glide doesn't support animated AVIF: https://bumptech.github.io/glide/int/avif.html + if (animate && roundCorners == ROUNDED_CORNERS_NONE && (path.isGif() || path.isWebP())) { // this is required to make glide cache aware of changes options.decode(Drawable::class.java) } else {