django-models-6

Last Updated :
Discuss
Comments

For storing user avatar images in a model, which Django field handles image uploads, performs automatic image-type validation using Pillow, and builds on the functionality of FileField?

ImageField(upload_to='avatars/') – Uploads and validates image files using Pillow

FileField(upload_to='avatars/') – Accepts general files without image validation

BinaryField() – Stores raw binary data, not intended for file uploads

URLField() – Stores links, not uploaded files

Tags:
Share your thoughts in the comments