2017 © Pedro Peláez
 

silverstripe-module silverstripe-kraken

Use the kraken API to optimize images

image

rsmclaren/silverstripe-kraken

Use the kraken API to optimize images

  • Wednesday, April 26, 2017
  • by rsmclaren
  • Repository
  • 2 Watchers
  • 1 Stars
  • 31 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 1 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Kraken Image Optimization Module

Maintainer Contact

  • Ryan McLaren

Requirements

Installation

  • Extract all files into a folder called "kraken" under your SilverStripe root. Install the Kraken PHP API into a folder called "vendor" under your Silverstripe root, or use composer (recommended):
composer require rsmclaren/silverstripe-kraken
  • Run dev/build?flush=all, (*1)

  • Sign up for the Kraken API and obtain your unique API Key and API Secret, (*2)

  • Enter your API Key and API Secret in the Settings > Kraken Tab fields, (*3)

Usage

After setting up your API keys, images will be automatically optimized using the Kraken API. You will likely notice that Uploading Images is slower after activating the module., (*4)

Existing images can be optimized using the Optimize Images button located in the Files section of the CMS. Individual images can also be optimized by viewing their details page and clicking the Optimize button., (*5)

You can enable the Kraken API Sandbox by using the following in your config.yml., (*6)

Kraken:
    dev: true

You can read more about the API Sandbox at https://kraken.io/docs/sandbox., (*7)

If you are using a version of SilverStripe <= 3.1.5 you must set the Image backend through your _config.php, (*8)

Image::set_backend('KrakenGDBackend'); //for GD
Image::set_backend('KrakenImagickBackend'); // for ImageMagick

Notes

Please note that images optimized using this module are replaced. A backup of the original, unoptimized image will not be saved. Please consider creating a backup of your assets folder before using this module., (*9)

The Versions

26/04 2017

dev-master

9999999-dev

Use the kraken API to optimize images

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe images optimize kraken