X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/d724a26754b3018ff6b119bb016c5ba261a51d0e..6a64d133526b25b46828bc75c2b3b99c0ab7e331:/IkiWiki/Plugin/img.pm diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm index 42de81bd1..748d28ace 100644 --- a/IkiWiki/Plugin/img.pm +++ b/IkiWiki/Plugin/img.pm @@ -42,8 +42,8 @@ sub preprocess (@) { #{{{ my $file = bestlink($params{page}, $image); my $srcfile = srcfile($file, 1); - if (! defined $srcfile) { - error(sprintf(gettext("%s not found"), $image)); + if (! length $file || ! defined $srcfile) { + return htmllink($params{page}, $params{destpage}, $image); } my $dir = $params{page};