(containing project wonderful) with nothing $article['content'] = $this->get_img_tags($xpath, '//td/img[contains(@src, "/comics/images/")]', $article); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // Least I Could Do (wtf image size?) $xpath = new DOMXpath($doc); $imgs = $xpath->query('//img'); //doesn't get simpler than having hundreds of plugins, one per step.