X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/ea2ab6f885b97081c37f9034d8b7e12a0e34ad3e..305c91ccfb8776cde2a6dca0caeec26aa1f711ad:/IkiWiki/Plugin/img.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm index 54c13d069..17a58ca7a 100644 --- a/IkiWiki/Plugin/img.pm +++ b/IkiWiki/Plugin/img.pm @@ -78,7 +78,11 @@ sub preprocess (@) { my $imgdatalink; my $r = $im->Read("$srcfile\[$pagenumber]"); error sprintf(gettext("failed to read %s: %s"), $file, $r) if $r; - + + if (! defined $im->Get("width") || ! defined $im->Get("height")) { + error sprintf(gettext("failed to get dimensions of %s"), $file); + } + my ($dwidth, $dheight); if ($params{size} eq 'full') {