Download the PHP package diarmuidie/imagerack without Composer

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

ImageRack

Project repo for the ImageRack PHP lib. Simple PHP image processor and server.

Developed by Diarmuid.

Build Status Coverage Status SensioLabsInsight

Features

Usage

Sample Heroku Setup guide and code: diarmuid.ie/blog/setting-up-a-php-image-server-on-heroku.

To start a new project use the composer create-project command to install the ImageRack package in a named folder:

Once the package is installed you can edit the contents of:

Server Configuration

Apache

Ensure the public/ directory is setup as your public-accessible DocumentRoot. The provided .htaccess file will redirect all requests to the ImageRack server.

Nginx

The Nginx configuration file should include the following information (in addition to any other settings you require):

Single Server Setup

A single server deploy is the most straight forward configuration. Source images must be stored in the storage/source folder. Resized images will be cached in storage/cache.

Multi-Server Setup

To use the ImageRack server in a multi-server environment (i.e. more than one web servers sitting behind a load ballancer) you must store the source and cache images in a distributed filesystem.

ImageRack comes with a sample configuration for using AWS S3 for this. To use this configuration you must make sure the Flysystem S3 adapter is installed:

Then you can edit public/index.php to load the sample S3 dependencies:

You will also have to change the bootstrap/dependencies.s3.sample.php file to use your S3 Secret and Key and change the bucket names.

Configuration

ImageRack allows you to configure the server in a number of ways:

HTTP Cache Max Age

You can overwrite the default http cache max age header value (30 days):

Setting the cache duration to zero will disable the cache by setting a Cache-Control:no-cache header.

Templates

Templates are objects that define how an image should be manipulated. You can create multiple tempaltes to manipuate an image in different ways. Templates must implement the Diarmuidie\ImageRack\Image\TemplateInterface interface. There is a sample template provided with ImageRack for resizing images to 320×240px.

After you create a new template it must be registered in the server:

The template name (large in this example) must be URL safe as it is used to access images using this template i.e. example.com/large/path/to/image.jpg.

Not Found Response

You can set an optional "not found" response. By default a 404 header will be sent with the body "File not found". However this can be modified using the setNotFound() method:

$response is an instance of Symfony\Component\HttpFoundation\Response. See the Symfony HTTP-Foundation docs for more info on what you can do with the response.

Error Response

You can set an optional "error" response. By default a 500 header will be sent with the body "There has been a problem serving this request". However this can be modified using the setError() method:

$exception is an instance of the caught exception.

$response is an instance of Symfony\Component\HttpFoundation\Response. See the Symfony HTTP-Foundation docs for more info on what you can do with the response.

Changelog

Version 0.1.0 (29 March 2015)

Version 0.1.1 (5 August 2015)

Version 0.2.0 (9 August 2015)

Version 0.2.1 (11 August 2015)

Version 0.3.0 (5 March 2017)

Authors

License

The MIT License (MIT)

Copyright (c) 2017 Diarmuid

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


All versions of imagerack with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
diarmuidie/imagerack-kernel Version ^0.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 diarmuidie/imagerack contains the following files

Loading the files please wait ....