shaare.it

ImproperlyConfigured: Pillow is required to use ImageField

7 Dec 2025

1 min read

ImproperlyConfigured: Pillow required for ImageField

$ python -c "from django.db import models; models.ImageField()"
Traceback (most recent call last):
ImproperlyConfigured: Pillow is not installed

Why this happens

ImageField depends on Pillow for image handling.

Fix

Install Pillow in your environment.

Wrong code

class Photo(models.Model):
    image = models.ImageField()

Fixed code

# pip install Pillow
class Photo(models.Model):
    image = models.ImageField()