X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/9f401d6617a11efcedda1c956b2ccea061a7540f..7bc87c8b9207ebb254bbd2452e1a37832b552d3f:/IkiWiki/Plugin/img.pm diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm index eb1b68124..103f6b2b3 100644 --- a/IkiWiki/Plugin/img.pm +++ b/IkiWiki/Plugin/img.pm @@ -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='';