Use of native wp_attachment_is_image function