4

I'm using ImageCache, ImageField and Content Profile to create my user profiles and I'd like to offer different default images if the user doesn't upload one.

Currently, ImageField offers a default image if none is uploaded but how can you show your user a lists of profile images in order to let them select one or upload their own ?

I'm looking to get something like this:

Select different profile images
Of course if the user upload one it will be used on their profile.

Any module you can recommend me or custom code to achieve this ? Does the Gravatar module allow this ?

Thanks a lot.

3

Use this module - Avatar Selection.

Does exactly what you're looking for.

  • And it supports imagecache ? – tostinni Jun 8 '11 at 0:20
  • I believe it does, yeah - see this project issue queue thread about it: drupal.org/node/431500 – chriscaple Jun 10 '11 at 12:17
  • Hum, so I had a look at it and it's almost what I'm looking for, it's used for avatars which imply you allow images for users (admin/user/settings) but I'm using ImageCache and also ImageField which is used to determine the profile image. So it's quite there but not. I'd rather have a "ImageCache Default Selection" module :). – tostinni Jun 11 '11 at 23:11
  • Ok we finally rewrote our field and use the $user->picture to use this module. Thanks. – tostinni Aug 3 '11 at 22:22
1

The Gravatar module currently allows the site administrator to choose the default image to use if the user doesn't have a Gravatar (including all the choices you've presented above), but this applies on a site-wide basis --- users cannot choose their own Gravatar variant, though they can still upload their own image if desired.

If you do end up developing support for per-user Gravatar variant switching, consider supporting this feature request, which anticipates similar functionality: http://drupal.org/node/1172546 .

  • I'm not very fond of using Gravatar for this solution because I can't control the default images. – tostinni Jun 6 '11 at 14:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.