Releases: oscarotero/Embed
Releases · oscarotero/Embed
2.2.3
New adapter for flickr
2.2.2
2.2.1
2.2
New imagesBlacklist
option to define the images you want to avoid (Thank, @soullivaneuh). You can use *
and ?
special characters in this way:
$config = [
'adapter' => [
'config' => [
'minImageWidth' => 16,
'minImageHeight' => 16,
'imagesBlacklist' => [
'http://example.com/full/path/to/image.jpg', //images with this exact url
'https?://ugglyimages.com/*', //images begining by "http://ugglyimages.com/" (http or https)
'*/bad_image.gif', //image ending in "/bad_image.gif"
'https?://test.*/*.png/', //more complex pattern
]
]
]
];
2.1.2
2.1.1
2.1.0
- Improved the capture of images in the html. The images with rel="nofollow" will be ignored
- More info provided by each image: width, height, mime, size, url and providers in which appears
- The
$info->images
array is numeric. - Improved the way of choose the main image. Now the bigger image found in the first provided will be choosen by default.
2.0.1
2.0
-
Removed support for php 5.3. If you need support for this, use the 1.x version.
-
Removed FastImage to get the images dimmension. Now we have
Embed\ImageInfo\Curl
that can execute parallel requests and uses getimagesizefromstring to get the image dimmensions. -
Changed the configuration array. Now it has subarrays to provide options for adapters, providers, resolvers and images. See readme for more info.
-
The images and providerIcons properties returns not only the url but also the mimetype and dimmensions:
//v.1x var_dump($info->images); /* array( 'http://example.com/images/image1.jpg', 'http://example.com/images/image2.jpg' ); */ //v2.x var_dump($info->images); /* array( 'http://example.com/images/image1.jpg' => array( 0 => 200, 1 => 500, 2 => 'image/jpeg', ), 'http://example.com/images/image2.jpg' => array( 0 => 320, 1 => 545, 2 => 'image/jpeg', ) ); */