That's because your code is botched up

It should read:
{if $products[product].free_shipping eq 'Y'}<img src="{$ImagesDir}/free_shipping.gif" alt="" />{/if}
You have an open image tag and a closing span tag in your code, which is probably why it wasn't displaying correctly.