WP: Check if image attached to the post