X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/b2327cfae4ac7da1df7bbf848f575b553f74eafb..cedf2c0af568d801fe2cf1917ac0202ce64f838b:/IkiWiki/Plugin/img.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm index 48211454e..bd527c8c8 100644 --- a/IkiWiki/Plugin/img.pm +++ b/IkiWiki/Plugin/img.pm @@ -39,7 +39,7 @@ sub preprocess (@) { } } - if (! exists $params{size}) { + if (! exists $params{size} || ! length $params{size}) { $params{size}='full'; } @@ -156,14 +156,22 @@ sub preprocess (@) { $imgurl="$config{url}/$imglink"; } + if (! exists $params{class}) { + $params{class}="img"; + } + + my $attrs=''; + foreach my $attr (qw{alt title class id hspace vspace}) { + if (exists $params{$attr}) { + $attrs.=" $attr=\"$params{$attr}\""; + } + } + my $imgtag=''.$params{alt}.''; my $link;