- if (my $table = eval { Data($inc) }) {
- printf '<img src="/%s" />', $_ for $table->{image} || ();
+ if ($table = $idx{$inc}) {
+ if (my $img = $table->{image}) {
+ EscapeHTML $name = $table->{imagealt} // $img =~ m{.*/([^/.]*)};
+ print qq{<img src="/$img" alt="$name" />};
+ }