]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/img.pm
templating question
[ikiwiki.git] / IkiWiki / Plugin / img.pm
index d295b833b21b57ccfef5c5d985ae91281efb466b..a186abdfce81f80ab8625d6c6b05872b34167c7c 100644 (file)
@@ -43,7 +43,7 @@ sub preprocess (@) {
                return '';
        }
 
-       push @{$links{$params{page}}}, $image;
+       add_link($params{page}, $image);
        # optimisation: detect scan mode, and avoid generating the image
        if (! defined wantarray) {
                return;
@@ -121,7 +121,7 @@ sub preprocess (@) {
        my $imgtag='<img src="'.$imgurl.
                '" width="'.$im->Get("width").
                '" height="'.$im->Get("height").'"'.
-               (exists $params{alt} ? '" alt="'.$params{alt}.'"' : '').
+               (exists $params{alt} ? ' alt="'.$params{alt}.'"' : '').
                (exists $params{title} ? ' title="'.$params{title}.'"' : '').
                (exists $params{class} ? ' class="'.$params{class}.'"' : '').
                (exists $params{id} ? ' id="'.$params{id}.'"' : '').