Title: Recognize Attachment Format
Last modified: August 20, 2016

---

# Recognize Attachment Format

 *  Resolved [Gianluca Cherubin](https://wordpress.org/support/users/goanimal/)
 * (@goanimal)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/recognize-attachment-format/)
 * Hi, is there a way to recognize the format of the attachment?
    In my particular
   need if it is a jpg. I’d like to show the image if it is a jpg, otherwise no.
   Thanks!
 * [http://wordpress.org/extend/plugins/attachments/](http://wordpress.org/extend/plugins/attachments/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [Gianluca Cherubin](https://wordpress.org/support/users/goanimal/)
 * (@goanimal)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/recognize-attachment-format/#post-3625263)
 * Got it! Just have to check if <?php echo $attachments->type(); ?> is “image”.

Viewing 1 replies (of 1 total)

The topic ‘Recognize Attachment Format’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/attachments_fafafa.svg)
 * [Attachments](https://wordpress.org/plugins/attachments/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/attachments/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/attachments/)
 * [Active Topics](https://wordpress.org/support/plugin/attachments/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/attachments/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/attachments/reviews/)

## Tags

 * [attachment](https://wordpress.org/support/topic-tag/attachment/)
 * [format](https://wordpress.org/support/topic-tag/format/)

 * 1 reply
 * 1 participant
 * Last reply from: [Gianluca Cherubin](https://wordpress.org/support/users/goanimal/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/recognize-attachment-format/#post-3625263)
 * Status: resolved