Using Gravatar with Phpthumbon?

Does anyone know how to make Gravatar work with Phpthumbon ?
I have tried that, but it seems it’s not working:
[[!phpthumbon? &input=`[[*publishedby:userinfo=`email`:Gravatar=`160`]]` &options=`&w=160&f=jpg`]]
[[!phpthumbon? &input=`[[!Gravatar? &email=`[[*publishedby:userinfo=`email`]]` &size=`160` &rating=`g` &default=`mp`]].png` &options=`w=160&h=160&zc=1`]]

Can phpthumbon handle images that are not hosted on modx or from another plugin ?

As far as I can tell phpThumbOn only works for local image files.

Yes that’s too bad. Thanks for your reply anyways

The extra pThumb can handle remote image files in principle.

Although when I tested it with Gravatar it didn’t work. There seems to be a “301 redirect” involved and the program couldn’t determine the image extension from the url either.

According to Gravatar, you can request a persons image with a hash of their email address, something like this (tested):

Put this where the Gravitar goes:

[[!Gravitar? &email=`[[+email]]` ]]
/* Gravitar snippet */
$output = '<img src="link to some image for people with no Gravitar" />';

$email = $modx->getOption('email', $scriptProperties, "", true);

if (!empty($email)) {
  $hash = md5(strtolower(trim($email)));
  $src = "" . $hash;
  $output = '<img src="' . $src . '" alt="Gravitar"' .  '/>';
return $output;