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 attachment image. Try setting it to false
(or omitting the parameter altogether, since false
is the default).
Other than that, it’s a long-shot, but try omitting full
, and let wp_get_attachment_image()
attempt to output its default image size, thumbnail
.