}
my $size = $params{size} || $imgdefaults{$params{page}}->{size} || 'full';
my $alt = $params{alt} || $imgdefaults{$params{page}}->{alt} || '';
+ my $title = $params{title} || $imgdefaults{$params{page}}->{title} || '';
if ($image eq 'defaults') {
$imgdefaults{$params{page}} = {
size => $size,
alt => $alt,
+ title => $title,
};
return '';
}
my $imgtag='<img src="'.$imgurl.
'" alt="'.$alt.'" width="'.$im->Get("width").
'" height="'.$im->Get("height").'"'.
+ (defined $title ? ' title="'.$title.'"' : '').
(exists $params{class} ? ' class="'.$params{class}.'"' : '').
(exists $params{id} ? ' id="'.$params{id}.'"' : '').
' />';
* Add PREFIX/bin to the hardcoded PATH within ikiwiki.
* Deal with different paths to perl when removing -T flag.
* Add missing de.po. Closes: #471540
+ * img: Support a title attribute, will be passed through to html.
+ Closes: #478718
-- Joey Hess <joeyh@debian.org> Sat, 26 Apr 2008 15:09:36 -0400
original image's aspect ratio is always preserved, even if this means
making the image smaller than the specified size.
-You can also pass `alt`, `class` and `id` parameters. These are passed through
-unchanged to the html img tag.
+You can also pass `alt`, `title`, `class` and `id` parameters. These are
+passed through unchanged to the html img tag.
The `link` parameter is used to control whether the scaled down image links
to the full size version. By default it does; set "link=somepage" to link