diff options
Diffstat (limited to 'IkiWiki/Plugin/img.pm')
-rw-r--r-- | IkiWiki/Plugin/img.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm index 9385f6417..88a3d7b4d 100644 --- a/IkiWiki/Plugin/img.pm +++ b/IkiWiki/Plugin/img.pm @@ -106,7 +106,11 @@ sub preprocess (@) { #{{{ if (! defined $params{link} || lc($params{link}) eq 'yes') { return '<a href="'.$fileurl.'">'.$imgtag.'</a>'; } + elsif ($params{link} =~ /^\w+:\/\//) { + return '<a href="'.$params{link}.'">'.$imgtag.'</a>'; + } elsif (length bestlink($params{page}, $params{link})) { + add_depends($params{page}, $params{link}); return htmllink($params{page}, $params{destpage}, $params{link}, linktext => $imgtag, noimageinline => 1); |