Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to apply cloudinary transformations outside of templates #34

Open
justuswilhelm opened this issue Feb 9, 2022 · 0 comments
Open

Comments

@justuswilhelm
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant