X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/c2afda7f90c595d3256625c81aabc90252b7b07f..19a7752021249eb8984e523fd6ed5a3730dc9be7:/IkiWiki/Plugin/img.pm?ds=inline 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};