Using Celery for uploading files in django

Hello friends👋🏻
I was wondering how to use Celery workers for uploading files in django.
I tried implementing it on the ProductImage class we defined in the course by overriding the create method of our ProductImageViewSet.
But I found out the default json endcoder in django cannot serialize ImageFields.
Here’s my implementation. I would appreciate it if you guys can help:

class ProductImageSerializer(serializers.ModelSerializer):
    class Meta:
        model = ProductImage
        fields = ['id', 'image']

from time import sleep
from celery import shared_task
from .models import ProductImage

def upload_image(product_id, image):
    print('Uploading image...')
    product = ProductImage(product_id=product_id, image=image)

this is the create method I tried to override:

def create(self, request, *args, **kwargs):
    product_id = self.kwargs['product_pk']
    image = self.request.FILES['image']
    image_data =
    upload_image.delay(product_id, image_data)

    return Response('Thanks')