This small piece of code allows you to add product image in magento e-commerce site.

Path: app/design/frontend/your_theme_directory/default/template/catalog/product/compare/sidebar.phtml

 

<?php
$product = Mage::getModel("catalog/product")->load($_item->getProductId());
echo "<img src='" . Mage::helper('catalog/image')->init($product, 'small_image')->keepFrame(false)->resize(50) . "'>";
?>

Note:  You have to place your code inside <ol id=”compare-items”>