X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/d7cfcef54a067221b801de17fafc1f05a13c2004..0802f92561a8e05da0299e3a1c94bebdd7c8d1e5:/IkiWiki/Plugin/img.pm diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm index a69175ba6..103f6b2b3 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'; } @@ -152,8 +152,12 @@ sub preprocess (@) { $imgurl=urlto($imglink, $params{destpage}); } else { - $fileurl="$config{url}/$file"; - $imgurl="$config{url}/$imglink"; + $fileurl=urlto($file); + $imgurl=urlto($imglink); + } + + if (! exists $params{class}) { + $params{class}="img"; } my $attrs='';