src/Readability.php
public function getImages()
    {
        $result = [];
        if ($this->getImage()) {
            $result[] = $this->getImage();
        }

        if (null == $this->getDOMDocument()) {
            return $result;
        }

        foreach ($this->getDOMDocument()->getElementsByTagName('img') as $img) {
            if ($src = $img->getAttribute('src')) {
                $result[] = $src;
            }
        }

        if ($this->configuration->getFixRelativeURLs()) {
            foreach ($result as &$imgSrc) {
                $imgSrc = $this->toAbsoluteURI($imgSrc);
            }
        }

        $result = array_unique(array_filter($result));

        return $result;
    }
public function getImages()
    {
        $result = [];
        if ($this->getImage()) {
            $result[] = $this->getImage();
        }

        if (null == $this->getDOMDocument()) {
            return $result;
        }

        foreach ($this->getDOMDocument()->getElementsByTagName('img') as $img) {
            if ($src = $img->getAttribute('src')) {
                $result[] = $src;
            }
        }

        if ($this->configuration->getFixRelativeURLs()) {
            foreach ($result as &$imgSrc) {
                $imgSrc = $this->toAbsoluteURI($imgSrc);
            }
        }

        $result = array_unique(array_filter($result));

        return $result;
    }
public function getImages ( ) { $ result = [ ] ; if ( $ this -> getImage ( ) ) { $ result [ ] = $ this -> getImage ( ) ; } if ( null == $ this -> getDOMDocument ( ) ) { return $ result ; } foreach ( $ this -> getDOMDocument ( ) -> getElementsByTagName ( 'img' ) as $ img ) { if ( $ src = $ img -> getAttribute ( 'src' ) ) { $ result [ ] = $ src ; } } if ( $ this -> configuration -> getFixRelativeURLs ( ) ) { foreach ( $ result as & $ imgSrc ) { $ imgSrc = $ this -> toAbsoluteURI ( $ imgSrc ) ; } } $ result = array_unique ( array_filter ( $ result ) ) ; return $ result ; }
Returns all the images of the parsed article.

@return array
Returns all the images of the parsed article .