I am storing a profile picture for each user in our database.
class User(AbstractBaseUser, PermissionsMixin):
profile_picture = models.ImageField(
upload_to="profile_picture/",
blank=True,
null=True,
)
Now, I would like to return a cropped or otherwise transformed version of the profile_picture to a client requesting it via a REST API. What method can I use to get a CloudinaryImage instance of the image?
I am storing a profile picture for each user in our database.
Now, I would like to return a cropped or otherwise transformed version of the profile_picture to a client requesting it via a REST API. What method can I use to get a CloudinaryImage instance of the image?