How to redirect WordPress attachment pages
- Click on the new Search Appearance menu link under SEO in your dashboard sidebar.
- Navigate to the Media tab.
- Find the option to Redirect Attachment URLs to the attachment itself.
- Click on the Yes to turn it on.
- Save the changes at the bottom of the page.