Hello,

For a website on which I am working I require that there be two sizes for the user picture: a relatively large (200x200) image, and a smaller, 'thumbnail' version. What is the cleanest way to implement this? The image resizing occurs in user.module:user_validate_picture, so unfortunately if I make my own validation hook I no longer have access to the original image. Or do I? Resizing twice is not an option, i.e., please don't suggest that I produce the thumbnail from the larger version -- I need to produce both images from the original.

Any thoughts?

Thanks.

P.S., I'm (relatively) new to Drupal, so I understand I might have some conceptual problems. However, I am overall quite experienced with PHP and web development in general.

Comments

vm’s picture

the image.module may be what you are after.

heres a link to the media type modules, im sure you will find what you are after. http://drupal.org/project/Modules/category/67

the list is in alphabetical order.

farmerje’s picture

We already use the image module, and our problem is not in the creation of the thumbnails, but rather the best way to give a user what is tantamount to two profile pictures. Or am I missing something in your comment?

vm’s picture

nope it was me missing the word "user" in your post. my apologies.

farmerje’s picture

Ah, no worries. :)

farmerje’s picture

No thoughts? Hrmph.

farmerje’s picture

One last plea before I let this thread sink off into oblivion. Anyone?

doodikopf’s picture

today i was looking for a way to have two or more versions of profile pictures as well as allowing users to have a personal gallery, where they set view-permissions for.
however, what I found where these two links. you might want to take a look:

if you already found a golden way it would be nice to publish it here.

thanks & bye

farmerje’s picture

Unfortunately the solution I came up with before even posting here was essentially the solution described in your first post, i.e., modify user_validate_picture directly.