I have a page where I want to exclude all image attachment on my post from being displayed.

I used this code but it's not working:

```
$attachments = get_posts($args);
if ($attachments) {
    foreach ($attachments as $attachment) {
         if (($attachment->post_mime_type!="image/png") || ($attachment->post_mime_type!="image/jpg"))   {  
             echo substr(apply_filters('the_title', $attachment->post_title), 0, 25);
             echo '.zip';
             echo ' - (';
             echo _format_bytes(filesize( get_attached_file( $attachment->ID ) ));
             echo ')';
         }
    }
}

```