I changed:
<?php the_attachment_link(1); ?>
to:
<?php
$args = array( 'post_type' => 'attachment', 'numberposts' => 1, 'post_status' => null, 'post_parent' => get_the_ID() );
$attachments = get_posts($args);
if ($attachments) {
foreach ( $attachments as $attachment ) {
the_attachment_link( $attachment->ID , true );
}
}
?>
The images is displayed properly but, unfortunately, I only can choose between original size image or thumbnail. I need to show the image the same size has been attached. :-/ I thought it was simpler.