Question

I need to implement avatar in my application. I see there's django-avatar but maybe there are other solutions. I need upload new avatars and resize it to a standard resolution if they're too big.

Tips?

Was it helpful?

Solution 2

I solved with django-avatar.

OTHER TIPS

If your main concern is handling the image size and resolution you should take a look at these two packages:

easy-thumbnails comes with a ThumbnailerImageField that automatically resizes an uploaded image for you.

You can use the ThumbnailerField or ThumbnailerImageField fields (based on FileField and ImageField, respectively) for easier access to retrieve (or generate) thumbnail images, use different storages and resize source images before saving.

You can try django-avatar-crop.

Using gravatar is really easy with django-gravatar. Personally I hate uploading new profile images to every single site...

Example usage to display 40x40 thumbnail of the user's gravatar:

{% load gravatar %}
{% gravatar_for_user request.user 40 g %}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top