[SmartCrawl Pro] Attachment page redirect to parent page

By default Wordpress creates a page for every media item uploaded. All of these pages end up in Google search results and look a bit silly. They may have a negative impact on SEO too. It would be very nice to have a checkbox in SmartCrawl Pro to "Redirect image attachment pages". If checked, the following code would need to be executed:

function myprefix_redirect_attachment_page() {?if ( is_attachment() ) {?global $post;?if ( $post && $post->post_parent ) {?wp_redirect( esc_url( get_permalink( $post->post_parent ) ), 301 );?exit;?} else {?wp_redirect( esc_url( home_url( '/' ) ), 301 );?exit;?}?}?}?add_action( 'template_redirect', 'myprefix_redirect_attachment_page' );

The second-best SEO plugin that starts with "Y" does have this feature and there are some plugins available to do this too. It would be really nice to have as part of SmartCrawl Pro!