added legend image handler