]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/img.pm
(no commit message)
[git.ikiwiki.info.git] / IkiWiki / Plugin / img.pm
index 2375ead8968b6a9baf64ff8ac825dbde6a75b82d..103f6b2b3510067f10a5eddf86f8e657ba96fe29 100644 (file)
@@ -152,14 +152,11 @@ 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";
-       }
-       else {
+       if (! exists $params{class}) {
                $params{class}="img";
        }