use wp_get_attachment_image() to show attachments
You’re obviously getting data returned for $attachments = get_posts(); otherwise, you wouldn’t be able to output $attachment->post_title. So the issue must be with your wp_get_attachment_image() call. The first thing I would check is: why are you setting the $icon parameter to true? This parameter is intended to output a mime-type icon, instead of the actual … Read more