Every now and then, you might end up with a custom image type in your Magento store. Maybe the initial ones don’t allow enough flexibilty or you need to show a specific image somewhere about som aspect of your product?

I had this exact issue recently where I needed to store a colour swatch for a product and load it on a specific page.

The code for this is actually nice and straight forward:

if ($_helper->productAttribute($child, $child->getColourSwatch(), 'colour_swatch') != 'no_selection' ) {
     echo '';
}

Image Credit: kevin dooley