1Libravatar::URL(3) User Contributed Perl Documentation Libravatar::URL(3)
2
3
4
6 Libravatar::URL - Make URLs for Libravatars from an email address
7
9 use Libravatar::URL;
10
11 my $url = libravatar_url( email => 'larry@example.org' );
12
14 See <http://www.libravatar.org> for more information.
15
17 libravatar_url
18
19 # By email
20 my $url = libravatar_url( email => $email, %options );
21
22 # By OpenID
23 my $url = libravatar_url( openid => $openid, %options );
24
25 Constructs a URL to fetch the Libravatar for the given $email address
26 or $openid URL.
27
28 %options are optional. "libravatar_url" will accept all the options of
29 "gravatar_url" in Gravatar::URL except for "rating" and "border".
30
31 The available options are...
32
33 size
34
35 Specifies the desired width and height of the avatar (they are square).
36
37 Valid values are from 1 to 512 inclusive. Any size other than 80 may
38 cause the original image to be downsampled using bicubic resampling
39 before output.
40
41 size => 40, # 40 x 40 image
42
43 default
44
45 The url to use if the user has no avatar.
46
47 default => "http://www.example.org/nobody.jpg"
48
49 Relative URLs will be relative to the base (ie. libravatar.org), not
50 your web site.
51
52 Libravatar defines special values that you may use as a default to
53 produce dynamic default images. These are "identicon", "monsterid",
54 "wavatar" and "retro". "404" will cause the URL to return an HTTP 404
55 "Not Found" error instead and "mm" will display the same "mystery man"
56 image for everybody. See <http://www.libravatar.org/api> for more
57 info.
58
59 If omitted, Libravatar will serve up their default image, the orange
60 butterfly.
61
62 base
63
64 This is the URL of the location of the Libravatar server you wish to
65 grab avatars from. Defaults to <http://cdn.libravatar.org/avatar/> for
66 HTTP and <https://seccdn.libravatar.org/avatar/> for HTTPS.
67
68 short_keys
69
70 If true, use short key names when constructing the URL. "s" instead of
71 "size", "d" instead of "default" and so on.
72
73 short_keys defaults to true.
74
75 https
76
77 If true, serve avatars over HTTPS instead of HTTP.
78
79 You should select this option if your site is served over HTTPS to
80 avoid browser warnings about the presence of insecure content.
81
82 https defaults to false.
83
85 Copyright 2011, Francois Marier <fmarier@gmail.com>.
86
87 This program is free software; you can redistribute it and/or modify it
88 under the same terms as Perl itself.
89
90 See http://dev.perl.org/licenses/artistic.html
91
93 <http://www.libravatar.org> - The Libravatar web site
94
95 <http://www.libravatar.org/api> - The Libravatar API documentation
96
97
98
99perl v5.32.1 2021-01-27 Libravatar::URL(3)