Imager Craft Plugin

An image manipulation plugin for the Craft CMS that supports imgix URLs
PHP 352 15 days ago aelvan/Imager-Craft Maintainer: André Elvan

Features

  • The most efficient template syntax for doing a bunch of image transforms in one go.
  • Transforms are completely file based, no database queries needed.
  • Transform Assets (local and cloud-based ones), local images, external images, or even the transformed images themselves.
  • Upload and serve transforms from Amazon S3 or Google Cloud Storage. Or, write your own storage interface to use whichever cloud service you want.
  • Optimize your transformed images with jpegoptim, jpegtran, mozjpeg, optipng, pngquant, gifsicle, TinyPNG, Imagemin or Kraken. Or, write your own optimizer interface for whichever post-optimization tool or service you want.
  • Support for offloading all your transforms to Imgix.
  • Support for interlaced/progressive images.
  • Support for animated gifs.
  • In addition to jpeg, gif and png, you can save images in webp format (if you have the necessary server requirements).
  • Crop position is relative (in percent) not confined to edges/center (but the built-in keywords still works). { width: 600, height: 600, mode: 'crop', position: '20% 65%' }
  • New cropZoom parameter for when you want to get a little closer. { width: 600, height: 600, mode: 'crop', position: '20% 65%', cropZoom: 1.5 }
  • New croponly mode. To crop, not resize. { width: 600, height: 600, mode: 'croponly', position: '20% 65%' }
  • Easily use Craft's built in focal point when cropping. { width: 600, height: 600, position: asset.getFocalPoint() }
  • New letterbox resize mode. { width: 600, height: 600, mode: 'letterbox', letterbox: { color: '#000', opacity: 0 } }
  • If you know the aspect ratio you want, you don't have to calculate the extra height/width. { width: 800, ratio: 16/9 }
  • Basic image effects, including grayscale, negative, blur, sharpen, gamma and colorize. { effects: { sharpen: true, gamma: 1.4, colorize: '#ff9933' } }
  • Advanced effects, including color blend, tint, sepia, contrast, modulate, normalize, contrast stretch, unsharp mask, posterize and vignette (Imagick imagedriver only). { effects: { modulate: [100, 40, 100], colorBlend: ['rgb(255, 153, 51)', 0.5] } }
  • Your own choice of which resize filter to use. Speed vs. quality is up to you (Imagick imagedriver only).
  • Concerned about people copying your images? You can add a watermark to them with Imager. { watermark: { image: logo, width: 80, height: 80, position: { right: 30, bottom: 30 }, opacity: 0.8, blendMode: 'multiply' } }
  • Imager also lets you get color information, dominant color and palette, from your images.
  • Imager also includes a bunch of color utilities for getting brightness, hue, lightness, percieved brightness, relative luminance, saturation, brightness difference, color difference and (puh!) contrast ratio.

Get Started

Documentation and additional examples for the Imager Craft Plugin library can be found on GitHub at https://github.com/aelvan/Imager-Craft.


More Plugins