2017 © Pedro Peláez
 

silverstripe-module silverstripe-tinypng

image

kinglozzer/silverstripe-tinypng

  • Friday, November 24, 2017
  • by kinglozzer
  • Repository
  • 1 Watchers
  • 3 Stars
  • 232 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 1 Open issues
  • 13 Versions
  • 12 % Grown

The README.md

SilverStripe TinyPNG

An extension to SilverStripe's Image class to integrate with the TinyPNG API., (*1)

Installation

With composer:, (*2)

composer require kinglozzer/silverstripe-tinypng ^3.0

Usage

Add your TinyPNG API key to your _config.yml:, (*3)

Kinglozzer\SilverStripeTinyPng\ImageExtension:
  tinypng_api_key: 'xxxx_yyyy_zzzz'

Add the Compressed method to your templates when outputting images:, (*4)

{$Image.CroppedImage(150, 300).Compressed}

NOTE: Compressed must be the last modification you call on your image - otherwise you’ll compress an image, then resample it again afterwards, potentially undo-ing the compression., (*5)

If you set an invalid API key, or exceed your monthly API allowance, then a warning will be shown in dev/test mode. In live mode compression will (intentionally) silently fail and output the un-compressed image, but will still log a message via the Logging API., (*6)

The Versions

24/11 2017

dev-master

9999999-dev https://github.com/kinglozzer/silverstripe-tinypng

  Sources   Download

BSD-3-Clause

The Requires

 

image silverstripe compress tinypng

24/11 2017
15/05 2017
15/05 2017
15/05 2017
15/05 2017

0.1.x-dev

0.1.9999999.9999999-dev https://github.com/kinglozzer/silverstripe-tinypng

  Sources   Download

BSD-3-Clause

The Requires

 

image silverstripe compress tinypng

15/05 2017
17/03 2015
30/01 2015
30/01 2015
29/01 2015
28/01 2015
13/01 2015