- my $file = bestlink($params{page}, $image) || return "[[img $image not found]]";
+ my $file = bestlink($params{page}, $image)
+ || return "[[img ".sprintf(gettext("%s not found"), $image)."]]";
my @blob = $im->ImageToBlob();
writefile($imglink, $config{destdir}, $blob[0], 1);
}
my @blob = $im->ImageToBlob();
writefile($imglink, $config{destdir}, $blob[0], 1);
}
- $fileurl=IkiWiki::abs2rel($file, IkiWiki::dirname($params{destpage}));
- $imgurl=IkiWiki::abs2rel($imglink, IkiWiki::dirname($params{destpage}));
+ $fileurl=urlto($file, $params{destpage});
+ $imgurl=urlto($imglink, $params{destpage});