Django Rest Framework - How to store a GIF image

I am working on a Django project using Django Rest Framework, and I am facing an issue related to storing and processing GIF images in one of my models.

class GiftCardPlan(model.Model):
# ... other fields ...
image = ProcessedImageField(null=True, blank=True, upload_to=giftcardplan_image_path,
                            processors=[SmartResize(480, 290, upscale=False)],
                            options={'quality': 100})


class GiftCardPlanSerializer(serializers.ModelSerializer):
    image = Base64ImageField(read_only=True)

I want to handle GIF images properly within the GiftCardPlan model. I've tried different approaches, but none seem to work as expected. My current implementation loses GIF animation during processing.

Back to Top