2

Drupal 7: Privatemsg.

The following statement, when included in the privatemsg-view.tpl.php template prints the author's picture:

print theme('user_picture', array('account' => $message->author));

How do I modify it to include an image style?

Any help is greatly appreciated. Thank you. :)

1 Answer 1

3

This is off the top of my head with some parts but I think this is the way you would do it.

print theme('image_style', array('path' => $message->author->picture->uri, 'style_name' => '{image-style}'));

With {image-style} replaced with image style that you want like thumbnail.

If this doesn't work I will take a second look.

1
  • Bravo @burnsjeremy, that was not an easy one, but you got it right! Thanks a million. :)
    – user14666
    Commented Jun 6, 2015 at 3:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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