Skip to content

How to apply cloudinary transformations outside of templatesΒ #34

@justuswilhelm

Description

@justuswilhelm

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions