Download the PHP package silencesoft/slim-image-resize without Composer

On this page you can find all versions of the php package silencesoft/slim-image-resize. 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 slim-image-resize

Image Resize Middleware for Slim 3

Note

This is an update to original project tuupola/slim-image-resize to work with slim 3.

This middleware implements automatic image resizing based on image filename.

Author Build Status HHVM Status Coverage

Install

You can install latest version using composer.

Configuration

Configuration options are passed as an array. There are no mandatory parameters.

You can configure the allowed image extensions and cache folder. Cache folder must be writable by webserver process. Image quality applies only for jpg images. Example options shown below are also the default options used by the middleware.

Caching

For caching to work you also must add the following to your .htaccess file. These rules should be added before Slim rewrite rules. Folder name must be the same you passed in as middleware configuration option. With caching rewrite rules in place only first request is served by PHP. All subsequent requests are served with static file from cache folder.

If your Slim application is installed in to a subfolder use the following rewrite rule instead. This example assumes the subfolder is called example.

Usage

With middleware configured you can create different sizes of images by altering the filename.

HTML above will produce the following images.

Original 400x200 x200 200x 100x100

Security

By default it is possible to create any size image. If images are also cached you should restrict which sizes middleware is allowed to create. Otherwise it is possible to make requests arbitary number of different sizes of images.

If you have arbitary number of different sizes it is also possible to sign images with secret key.

You must include the signature in the image name.

Signature for above image was generated with following code.


All versions of slim-image-resize with dependencies

PHP Build Version
Package Version
Requires slim/slim Version ~3.0
intervention/image Version ~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 silencesoft/slim-image-resize contains the following files

Loading the files please wait ....