Download the PHP package toughdeveloper/imageresizer without Composer

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

Image Resizer

Introduction

Resizes an image to the required dimensions. It accepts a string with a file path to the image or a October\Rain\Database\Attach\File object (you will have one of these if you have used the attachOne or AttachMany relationship)

Please note, the not found image can be overwritten via the settings in the admin area.

Available filters

imageHeight()

Using a string

Please note, if the filter alters the URL, you must apply resize afterwards

Using a variable

resize(int $width [, int $height , array $options])

Resize an image according to the given params. If $width or $height is 0, that value is calculated using original image ratio

Options

Key Description Default Options
mode How the image should be fitted to dimensions auto exact, portrait, landscape, auto, fit or crop
offset Offset the resized image [0,0] [int, int]
extension The extension on the image to return auto auto, jpg, jpeg, gif, png
quality The quality of compression *requires cache clear 95 0-100
sharpen Sharpen the image across a scale of 0 - 100 *requires cache clear 0 0-100
compress Whether the image should be compressed or not. Only takes effect when TinyPng compression is enabled. true true,false

Usage in template

Usage in PHP

The image resizer can also be used easily in PHP, as follows:

Usage in Backend List

The image resizer can also be used on backend lists with the type of thumb, e.g.

This works with:

You can also optionally pass width (default 50), height (default 50) and options as follows:

imageWidth() - imageHeight()

Return current image width/height - useful if you need to know the size of an image resized only by one side.

Image Compression via TinyPNG

The plugin integrates with the TinyPNG API to provide image compression. A developer API key is required, to obtain one visit https://tinypng.com/developers. Once obtained, enter it in the Image Resizer Settings area of October CMS backend.

TinyPNG offer 500 free compression per month, the plugin automatically caches resized images to save credits, an option to not compress certain images is also available.

If you are focussed on pagespeed, it is recommended to set your image quality at 70-80 to obtain the lowest filesize whilst still retaining high quality images.


All versions of imageresizer with dependencies

PHP Build Version
Package Version
Requires composer/installers Version ~1.0
tinify/tinify Version ^1.3
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 toughdeveloper/imageresizer contains the following files

Loading the files please wait ....