find:

$item = "<img src='{$attachment->guid}' alt='{$attachment->post_title}'> {$desc}\n";

change to:

$item = "{$desc} <br> <img src='{$attachment->guid}' alt='{$attachment->post_title}'> \n";