To further clarify the problem, here is the code snippet:
function change_post_content( $post_content, $attachment_id ) {
$medium = wp_get_attachment_image($attachment_id, 'medium');
$post_content .= $medium;
return $post_content;
}
which inserts the following string in the new post:
<img width="1" height="1" src="https://zenbrett.fritz.box/wp-content/uploads/2014/05/20140501-131342mws1.jpg" class="attachment-medium" alt="Maypole and St Florian statue" />
where the image is exactly the image I was uploading