Gets images attached to a post in WordPress.