diff options
Diffstat (limited to 'IkiWiki/Plugin')
-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 c4e4a6f22..14a32f635 100644 --- a/IkiWiki/Plugin/img.pm +++ b/IkiWiki/Plugin/img.pm @@ -106,6 +106,10 @@ sub preprocess (@) { #{{{ if (! defined $params{link} || lc($params{link}) eq 'yes') { return '<a href="'.$fileurl.'">'.$imgtag.'</a>'; } + elsif (length bestlink($params{page}, $params{link})) { + return htmllink($params{page}, $params{destpage}, + $params{link}, linktext => $imgtag); + } else { return $imgtag; } |