Download the PHP package rych/thumbnail-finder without Composer

On this page you can find all versions of the php package rych/thumbnail-finder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package thumbnail-finder

Thumbnail Finder

Quick project I threw together as part of a larger project. While writing a content aggregator I found I needed a way to discover a thumbnail for the linked content.

This library only discovers the "best" image URL to use. Actually downloading and cropping/resizing/otherwise processing the image is out of scope.

How does it work?

The library simply scans an HTML document for an image suitable for use as a thumbnail and return the URL to that image. Suitable images are discovered via OpenGraph metadata, the older Facebook image_src microformat, and by crawling the document for img tags and using a simple algorithm for finding the "most interesting" image.

When the library has to resort to crawling the linked images, it downloads only as much of each image as is required to extract the image width and height. The library discards very small images and images which are much wider than tall or taller than wide. The remaining images are compared based on area, and the largest image is returned.

This library currently uses Symfony's Dom Crawler and CSS Selector components to work its magic. The Imagick extension for PHP is also required for extracting width and height from partial image downloads.

Usage

Very simple:

Installation

Composer:

To-do

This works for my purposes but there's always room to improve.


All versions of thumbnail-finder with dependencies

PHP Build Version
Package Version
Requires php Version >= 5.3.0
ext-imagick Version *
symfony/dom-crawler Version 2.4.*
symfony/css-selector Version 2.4.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rych/thumbnail-finder contains the following files

Loading the files please wait ....