Download the PHP package croxton/imgixer without Composer

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

Imgixer plugin for Craft CMS 5.x

Generate image transformation URLs that work with Imgix, Imagekit and Servd.

Requirements

This plugin requires Craft CMS 5.0.0-beta.1 or later.

Installation

To install the plugin, follow these instructions.

  1. Open your terminal and go to your Craft project:

    cd /path/to/project
  2. Then tell Composer to load the plugin:

    composer require croxton/imgixer
  3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Imgixer.

Configuring Imgixer

Copy config.php into Crafts config folder and rename it to imgixer.php.

Define each source with a unique handle. The same Imgix source domain may be referenced more than once, which can be useful if you want to use a different set of default parameters for images in a particular Asset volume, or an arbitrary grouping of images with similar characteristics, or if you have defined your Imgix source as a web proxy and need to reference multiple domains.

Using Imgixer

Using Imgixer with Servd.host asset sources

There are several ways to use Imgixer with Servd.host asset sources, and benefit from Servd's automatic environment prefixing (generated URLs are prefixed with local, staging or production).

With either option, you will first need to install Servd Assets and Helpers.

1. Using an Imgix Web Folder source

Servd Assets Platform v2

Servd Assets Platform v3

2. Use Servd's own image transformation service

Servd's Asset Platform provides an image transformation service that supports a subset of Imgix's Rendering API and covers the majority of use cases. If you are hosting with Servd it may be all you need.

Servd Assets Platform v2

Create a source in imgixer.php config, adding servd as the asset provider. Do not set an endpoint:

Servd Assets Platform v3

Create a source in imgixer.php config, adding servd as the asset provider. Add Servd's transform domain as the endpoint for the source (if you have set up a custom transform domain, use that instead).

Core parameter set

Supported by Imgix, Imagekit and Servd.

fm - output format

Can be one of: webp, png, jpeg | jpg, tiff.

w - width

Scales image to supplied width while maintaining aspect ratio.

h - height

Scales image to supplied height while maintaining aspect ratio.

q - quality

(default 75) - 1-100 - Controls the output quality of lossy file formats.

ar - aspect-ratio

(1.0:1.0) - When fit=crop, an aspect ratio such as 16:9 can be supplied, optionally with a height or width. If neither height or width are defined, the original image size will be used.

dpr - device-pixel-ratio

(1) - scales requested image dimensions by this multiplier.

fit - resize fitting mode

Can be one of: fill, scale, crop, clip, min, max.

fill-color

Used when fit is set to fill can be a loosely formatted color such as "red" or "rgb(255,0,0)".

crop - resize fitting mode

Can be one of: focalpoint, entropy, any comma separated combination of top, bottom, left right.

crop=focalpoint

Uses the fp-x and fp-y parameters to crop as close to the supplied point as possible.

crop=entropy

Crops the image around the region with the highest Shannon entropy.

crop=top,left (or bottom, right)

Crops the image around the region specified. Supply up to two region identifiers comma separated.

fp-x, fp-y - focal point x & y

Percentage, 0 to 1 for where to focus on the image when cropping with focalpoint mode.

auto

Can be a comma separated combination of: compress, format.

auto=format

If auto includes format, the service will try to determine the ideal format to convert the image to. The rules are:

auto=compress

The compress parameter will try to run post-processed optimizations on the image prior to returning it.

Extended parameter set

Supported by Imgix and Imagekit only. There may be some variation in image output as the behaviour of parameters does not always directly correlate between services.

blur

Applies a Gaussian style blur to your image, smoothing out image noise.

Valid values are in the range from 0 to 2000. The default value is 0, which leaves the image unchanged.

border

This adds a border to the image. It accepts two parameters - the width of the border and the color of the border: border=<border-width>,<hex code>

con - contrast

(0) Adjusts the contrast of the image. Valid values are in the range -100 – 100. The default value is 0, which leaves the image unchanged.

Note:

fit=facearea

Finds the area containing all faces, or a specific face in an image, and scales it to specified width and height dimensions. Great for thumbnail portraits.

Notes:

fit=fillmax

Resizes the image to fit within the requested width and height dimensions while preserving the original aspect ratio and without discarding any original image data. If the requested width or height exceeds that of the original, the original image remains the same size. Use the fill-color parameter to specify the background colour to use.

Note:

fp-z - focal point zoom

Must be a float between 1 and 100, inclusive. The default value is 1, representing the original size of the image, and every full step is the equivalent of a 100% zoom (e.g. fp-z=2 is the same as viewing the image at 200%). The suggested range is 1 – 10. For the focal point to be set on an image, fit=crop and crop=focalpoint must also be set.

lossless

The lossless parameter enables delivery of lossless images in formats that support lossless compression (JPEG XR and WEBP). Valid values are true and false.

radius

Used to specify the image corner radius in pixels. The background of rounded images will be transparent.

Note:

rot

Rotates the image by degrees according to the value specified. Valid values are in the range 0 – 359, and rotation is counter-clockwise with 0 (the default) at the top of the image.

sat=-100

Outputs a fully desaturated grayscale image.

sharp - sharpen

Sharpens the image using luminance (which only affects the black and white values), providing crisp detail with minimal color artifacts.

Recommended values are in the range 0 – 100. The default value is 0, which leaves the image unchanged.

trim

Trims the image to remove a uniform border around the image.

trim=auto

The image is trimmed automatically based on the border color.

trim=color

Imgix only: the image will trim away the hex color specified by the trim-color parameter.

trim-tol

The trim tolerance defines how different a color can be before the trim operation stops. Imgix requires trim=color to be set for this parameter to be applied.

Service-specific parameter sets

If you wish to be able to switch easily between service providers, try to stick with the core or extended set of parameters listed above. However, the full sets of available parameters for each of the supported image transform services can be found here:

Element API

Pass the image as the first argument to the function, and an array of Imgix parameters as the second argument.

Web proxy

When using Imgix or Imagekit as a proxy you need to provide the absolute URL to the image you want to proxy. You can do that at the template level (if you need to proxy multiple domains), or create a source for each proxied domain in your config and pass the proxy domain to the subfolder.

So for example you can have a config like this...

...and use like this in templates:

Alternatively, use a config like this...

...and use like this in templates:

Asset purging

When an image is edited in the control panel using Craft's image editor, Imgixer does NOT automatically issue an API request to the image provider to purge the corresponding URL from it's CDN. From the Imgix docs:

To absolutely ensure compliance for an updated asset, it is best to give the asset a new path by renaming the file. Purging an asset is only recommended when absolutely necessary.

Please ask your editors to always 'Save as a new asset' when editing an image in the control panel. If the image editor was invoked from an entry, the entry asset field will be automatically updated to link to the new asset.


All versions of imgixer with dependencies

PHP Build Version
Package Version
Requires craftcms/cms Version ^5.0.0
imgix/imgix-php Version ~3.1.0
imagekit/imagekit Version ^3.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 croxton/imgixer contains the following files

Loading the files please wait ....