Oops, seems I messed up with the paths to the image directory. Here is the working code:
code:
if (is_readable("{$config['imagepath']}/{$forum[$c][$f]['Keyword']}.gif")) {
$forumimagesize = getimagesize("{$config['imagepath']}/{$forum[$c][$f]['Keyword']}.gif");
$forumimage = "<img src="{$config['images']}/{$forum[$c][$f]['Keyword']}.gif" alt="{$forum[$c][$f]['Title']}" align="left" {$forumimagesize[3]}>";
} else {
$forumimage = "";
}