]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/img.pm
* Since the CGI had to drop the wiki lock to avoid deadlocking the
[ikiwiki.git] / IkiWiki / Plugin / img.pm
index 120326910988e4a2457b16268a89a79b7349e7e5..2a6533e39aa357572cdb7cc939667927f3e9e2cd 100644 (file)
@@ -6,7 +6,6 @@ package IkiWiki::Plugin::img;
 use warnings;
 use strict;
 use IkiWiki;
-use Image::Magick;
 
 my %imgdefaults;
 
@@ -37,6 +36,9 @@ sub preprocess (@) { #{{{
 
        my $dir = IkiWiki::dirname($file);
        my $base = IkiWiki::basename($file);
+
+       eval q{use Image::Magick};
+       error($@) if $@;
        my $im = Image::Magick->new;
        my $imglink;
        my $r;