I add a new image to each post. On my index page, each image links to its respective full post. When I'm viewing a post page, the image links to the page I'm already on.
I don't want the image to have an
<a> tag around it when I'm already on the page it links to. Is it possible to disable the link around the image when on a single post page without using the_excerpt instead of the_content on the index page?