aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/api-guide/fields.md2
-rw-r--r--rest_framework/fields.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/docs/api-guide/fields.md b/docs/api-guide/fields.md
index 03c5af32..e05c0306 100644
--- a/docs/api-guide/fields.md
+++ b/docs/api-guide/fields.md
@@ -286,7 +286,7 @@ An image representation.
Corresponds to `django.forms.fields.ImageField`.
-Requires the `PIL` package.
+Requires either the `Pillow` package or `PIL` package. The `Pillow` package is recommended, as `PIL` is no longer actively maintained.
Signature and validation is the same as with `FileField`.
diff --git a/rest_framework/fields.py b/rest_framework/fields.py
index 6c07dbb3..463d296f 100644
--- a/rest_framework/fields.py
+++ b/rest_framework/fields.py
@@ -966,7 +966,7 @@ class ImageField(FileField):
return None
from rest_framework.compat import Image
- assert Image is not None, 'PIL must be installed for ImageField support'
+ assert Image is not None, 'Either Pillow or PIL must be installed for ImageField support.'
# We need to get a file object for PIL. We might have a path or we might
# have to read the data into memory.