diff options
-rw-r--r-- | IkiWiki/Plugin/img.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm index 88a3d7b4d..b6e7c9e41 100644 --- a/IkiWiki/Plugin/img.pm +++ b/IkiWiki/Plugin/img.pm @@ -32,6 +32,11 @@ sub preprocess (@) { #{{{ } push @{$links{$params{page}}}, $image; + # optimisation: detect scan mode, and avoid generating the image + if (! defined wantarray) { + return; + } + my $file = bestlink($params{page}, $image); my $dir = $params{page}; |