Download the PHP package drroach/dynamic-image without Composer

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

DynamicImage

Create dynamically sized images on the fly so that they don't need to be resized when added or uploaded.

The goal of this script is to allow images to be generated on the fly to any size. This is done by using PHPs imagick libraries to creating images in a fraction of a second.

This script has a fully functioning file based cache system which renews when original images are updated. Images are generated to scale and generated to high resolution. There is also support for images that are hosted on seperate endpoints.

JPG, JPEG, PNG and GIF images are supported.

Params

The parameters are expected as a key, value array and passed when the object is created.

filename - required This is the original image filename including it's extension, for example, snorkel.jpg. This image can be of any size any will be rendered in near perferct resolution.

width - required This is the desired width of the image.

height - required This is the desired height of the image.

image_directory - This is the directory that all of your original images are held in. This cannot move 'up' through your filesystem to keep the script as a whole, more secure. This MUST also end with a trailing slash.

debug - If you wish for errors to be turned on, then you can set this to true to display any errors that may be occuring.

image_missing - If the requested image isn't found then this image is returned instead. This means that you never get a blank response and there's always something that you can display.

exceptions - Parameter to set whether or not you wish for exceptions to be thrown by the script. The default value is false so if you want exceptions to be thrown then you must set this to true when creating the object.

validate_image - Flag to indicate whether or not you want to check for the requested images' existance before looking to see if the image exists in cache. This means that if the image gets updated after it's been saved to cache then the image wont be regenerated. By default this is set to true.

invalidate_cache - Parameter to set whether or not the cache image should be invalidated after x amount of seconds. This means you can re-generate cache images every day for example.

Example AJAX request to load an image from a seperate domain

Request URL

http://yousite.com/loadimage.php?filename=snorkel.jpg&width=500&height=500

loadimage.php

HTML

If you have your images saved in a seperate folder, such as /images, you can set Dynamic Images to use that folder like so:

Potential Issues

Make sure that your cache folder is writable and that the apache user has permission to write on your machine. Usually user www-data.


All versions of dynamic-image with dependencies

PHP Build Version
Package Version
No informations.
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 drroach/dynamic-image contains the following files

Loading the files please wait ....