Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

avif: check for animated image for avif type

Max Pylypenkoae7f5f64bfc8
diff --git a/wger/utils/images.py b/wger/utils/images.py
index 7140bba55..b60150a14 100644
--- a/wger/utils/images.py
+++ b/wger/utils/images.py
@@ -46,5 +46,5 @@ def validate_image_static_no_animation(value):
)
# Check for animation
- if img_format == 'webp' and getattr(img, 'is_animated'):
+ if img_format in ('webp', 'avif') and getattr(img, 'is_animated'):
raise ValidationError('Animated images are not supported.')