Add method to JSAttachmentData to determine whether the attachment is an image