Make urls for libravatars from an email address
use Libravatar::URL; my $url = libravatar_url( email => '[email protected]' );
See <http://www.libravatar.org> for more information.
libravatar_url
# By email my $url = libravatar_url( email => $email, %options );
# By OpenID my $url = libravatar_url( openid => $openid, %options );
Constructs a \s-1URL\s0 to fetch the Libravatar for the given $email address or $openid \s-1URL\s0.
%options are optional. \*(C`libravatar_url\*(C' will accept all the options of \*(L"gravatar_url\*(R" in Gravatar::URL except for \*(C`rating\*(C' and \*(C`border\*(C'.
The available options are...
size
Specifies the desired width and height of the avatar (they are square).
Valid values are from 1 to 512 inclusive. Any size other than 80 may cause the original image to be downsampled using bicubic resampling before output.
size => 40, # 40 x 40 image
default
The url to use if the user has no avatar.
default => "http://www.example.org/nobody.jpg"
Relative URLs will be relative to the base (ie. libravatar.org), not your web site.
Libravatar defines special values that you may use as a default to produce dynamic default images. These are \*(L"identicon\*(R", \*(L"monsterid\*(R", \*(L"wavatar\*(R" and \*(L"retro\*(R". \*(L"404\*(R" will cause the \s-1URL\s0 to return an \s-1HTTP\s0 404 \*(L"Not Found\*(R" error instead and \*(L"mm\*(R" will display the same \*(L"mystery man\*(R" image for everybody. See <http://www.libravatar.org/api> for more info.
If omitted, Libravatar will serve up their default image, the orange butterfly.
base
This is the \s-1URL\s0 of the location of the Libravatar server you wish to grab avatars from. Defaults to <http://cdn.libravatar.org/avatar/> for \s-1HTTP\s0 and <https://seccdn.libravatar.org/avatar/> for \s-1HTTPS\s0.
short_keys
If true, use short key names when constructing the \s-1URL\s0. \*(L"s\*(R" instead of \*(L"size\*(R", \*(L"d\*(R" instead of \*(L"default\*(R" and so on.
short_keys defaults to true.
https
If true, serve avatars over \s-1HTTPS\s0 instead of \s-1HTTP\s0.
You should select this option if your site is served over \s-1HTTPS\s0 to avoid browser warnings about the presence of insecure content.
https defaults to false.
Copyright 2011, Francois Marier <[email protected]>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://dev.perl.org/licenses/artistic.html
<http://www.libravatar.org> - The Libravatar web site
<http://www.libravatar.org/api> - The Libravatar \s-1API\s0 documentation