i want attachment.php to return the image

Answer is this (thanks to WordPress Vampire here : Change Attachment Post URLs to File URLs) :

Create an attachment template file within the theme. Since we are only interested in images, the file should be image.php

<?php 

if ( have_posts() ) { 
    the_post(); 
    $image_url = wp_get_attachment_url();
}

header('Location: '.$image_url);

?>