When adding a featured image to a post, a dedicated page is created for this image which simply shows the title and the image. This attachment viewing page usually has little purpose and is not compatible with most themes. Anyone stumbling on one of these pages makes your site look weird to better to avoid access and keep things clean.
Adding this snippet to your theme’s functions.php will cause accessing an attachment page to redirect to the post it’s attached to. So http://my.blog/article/image1/ will redirect to http://my.blog/article/.
Striving for originality, usability, simplicity and style — Frique builds jQuery and WordPress plugins and themes that make life a little easier. Frique cares and writes about web and software usability, performance, development workflow and desire for perfection.