Libravatar::URL(3pm)
π NAME π
Libravatar::URL β bestie, this is the lil module that makes URLs for Libravatars out of an email address. that's it, that's the whole job, and it does it flawlessly π
β¨ SYNOPSIS β¨
okay so like, the tiniest possible usage, look how cute:
use Libravatar::URL;
my $url = libravatar_url( email => 'larry@example.org' );
one use, one function call, boom, you have a URL. main character energy fr fr π¦
πΈ DESCRIPTION πΈ
See <http://www.libravatar.org> for more information.
like, genuinely, that's what the docs say and I'm not gonna make stuff up about it. go look π
π Functions π
libravatar_url
# By email
my $url = libravatar_url( email => $email, %options );
# By OpenID
my $url = libravatar_url( openid => $openid, %options );
so what this does: it constructs a URL to fetch the Libravatar for whatever $email address or $openid URL you hand it. you can go by email, or you can go by OpenID, pick your fighter π
%options is optional, bestie, you don't have to pass anything. and here's the tea: libravatar_url will accept all the options of gravatar_url in Gravatar::URL, except for rating and border. so if you know Gravatar::URL, you already know most of this. slay.
The available options are... π
sizeβ specifies the desired width and height of the avatar (they are square, obviously, we're not doing rectangles here).
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"
β οΈ okay important one: relative URLs will be relative to the base (ie. libravatar.org), not your web site. do not get caught out by this one, it's giving trap.
Libravatar defines special values that you may use as a default to produce dynamic default images. These are identicon, monsterid, wavatar and retro. 404 will cause the URL to return an HTTP 404 "Not Found" error instead, and mm will display the same "mystery man" image for everybody. See <http://www.libravatar.org/api> for more info.
If omitted, Libravatar will serve up their default image β the orange butterfly π¦ iconic tbh.
baseβ this is the URL of the location of the Libravatar server you wish to grab avatars from. Defaults to <http://cdn.libravatar.org/avatar/> for HTTP and <https://seccdn.libravatar.org/avatar/> for HTTPS.short_keysβ if true, use short key names when constructing the URL."s"instead ofsize,"d"instead ofdefaultand so on.short_keysdefaults to true.httpsβ if true, serve avatars over HTTPS instead of HTTP.
You should select this option if your site is served over HTTPS to avoid browser warnings about the presence of insecure content. no cap, browsers are so dramatic about mixed content π
https defaults to false.
π LICENSE π
Copyright 2011, Francois Marier <fmarier@gmail.com>.
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>
π SEE ALSO π
- <http://www.libravatar.org> β The Libravatar web site
- <http://www.libravatar.org/api> β The Libravatar API documentation
and that's the whole page, bestie π this one's from perl v5.34.0, dated 2022-06-14, and it's a User Contributed Perl Documentation page β so go forth, make your URLs, serve your avatars, stay cute π«Άβ¨
π¦ where this page comes from
- debian bookworm: libgravatar-url-perl 1.07-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libgravatar-url-perl 1.07-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libgravatar-url-perl 1.07-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libgravatar-url-perl 1.07-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libgravatar-url-perl 1.07-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms