There is no license information available for the latest version (v1.0.0) of this package.

Get the first image from a web page

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

v1.0.0 2014-08-03 23:55 UTC


Simple library that returns the first image on a web page. Though, only if it's in an <img> tag.


Add to your composer.json file

"matula/firstimg": "dev-master"


$url = '';
$image = new Matula\Firstimg\Firstimg($url);
echo $image->downloadImage();

This will find the first image on the page and download it. Currently, it also resizes the image to 100px.


  • better documentation
  • customize the image's filename/extension
  • customize image resizing, or disable
  • better formatting, etc