public function thumbnail() { $tid = get_post_thumbnail_id($this->ID); if ($tid) { //return new Image($tid); return new $this->ImageClass($tid); } }