Download the PHP package arthurhoaro/web-thumbnailer without Composer

On this page you can find all versions of the php package arthurhoaro/web-thumbnailer. 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 web-thumbnailer

Web Thumbnailer

Coverage Status Scrutinizer Code Quality

PHP library which will retrieve a thumbnail for any given URL, if available.

Features

Requirements

Mandatory:

(Highly) Recommended:

Installation

Using Composer:

Usage

Using WebThumbnailer is pretty straight forward:

Result:

Thumbnail configuration

There are 2 ways to set up thumbnail configuration:

Download mode

There are 3 download modes, only one can be used at once:

Usage:

Warning: hotlinking means that thumbnails won't be resized, and have to be downloaded as their original size.

Image Size

In download mode, thumbnails size can be defined using max width/height settings:

Usage:

Bonus feature: for websites which support an open API regarding their thumbnail size (e.g. Imgur, FlickR), WebThumbnailer makes sure to download the smallest image matching size requirements.

Image Crop

Image resizing might not be enough, and thumbnails might have to have a fixed size. This option will crop the image (from its center) to match given dimensions.

Note: max width AND height must be provided to use image crop.

Usage:

Resize Mode

This setting choose whether to use imagecopyresized (RESIZE mode) or imagecopyresampled (RESAMPLE mode):

By default, this library uses RESAMPLE setting since the setting was introduced.

Example:

|---------------------RESIZE---------------------|---------------------RESAMPLE---------------------|

Usage:

Miscellaneous

Usage:

Settings

Settings are stored in JSON, and can be overrode using a custom JSON file:

Available settings:

Thumbnails path

In download mode, the path to the thumbnail returned by WebThumbnailer library will depend on what's provided to the path.cache setting. If an absolute path is set, thumbnails will be attached to an absolute path, same for relative.

Relative path will depend on the entry point of the execution. For example, if your entry point for all request is an index.php file in your project root directory, the default cache/ setting will create a cache/ folder in the root directory. Another example, for Symfony, the cache folder will be relative to the web/ directory, which is the entry point with app.php.

If you don't have a single entry point in your project folder structure, you should provide an absolute path and process the path yourself.

Contributing

WebThumbnailer can easily support more website by adding new rules in rules.json using one of the default Finders, or by writing a new Finder for specific cases.

Please report any issue you might encounter.

Also, feel free to correct any horrible English mistake I may have made in this README.

License

MIT license, see LICENSE.md


All versions of web-thumbnailer with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
phpunit/php-text-template Version ^1.2 || ^2.0
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 arthurhoaro/web-thumbnailer contains the following files

Loading the files please wait ....