X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/f42215cb65173299bca13cd8bafabdcb9ad2ab2d..b9e443c4d1ba0fdd64bbc2120831db490b185733:/IkiWiki/Plugin/img.pm diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm index 223b5a11f..32023fa97 100644 --- a/IkiWiki/Plugin/img.pm +++ b/IkiWiki/Plugin/img.pm @@ -44,6 +44,7 @@ sub preprocess (@) { } add_link($params{page}, $image); + add_depends($params{page}, $image); # optimisation: detect scan mode, and avoid generating the image if (! defined wantarray) { @@ -69,8 +70,6 @@ sub preprocess (@) { my ($dwidth, $dheight); if ($params{size} ne 'full') { - add_depends($params{page}, $image); - my ($w, $h) = ($params{size} =~ /^(\d*)x(\d*)$/); error sprintf(gettext('wrong size format "%s" (should be WxH)'), $params{size}) unless (defined $w && defined $h && @@ -171,7 +170,7 @@ sub preprocess (@) { my $b = bestlink($params{page}, $params{link}); if (length $b) { - add_depends($params{page}, $b); + add_depends($params{page}, $b, deptype("presence")); $imgtag=htmllink($params{page}, $params{destpage}, $params{link}, linktext => $imgtag, noimageinline => 1);