2017 © Pedro Peláez
 

silverstripe-module silverstripe-optimisedimages

image

joshcronin/silverstripe-optimisedimages

  • Wednesday, August 23, 2017
  • by joshcronin
  • Repository
  • 2 Watchers
  • 0 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

Silverstripe Optimised Images

Automatically optimise images that are uploaded to the SilverStripe CMS, (*1)


Installation

Installation can be done either by composer or by manually downloading a release., (*2)

Via Composer

$ composer require joshcronin/silverstripe-optimisedimages, (*3)

Manually

  1. Download the module from the releases page.
  2. Extract the files.
  3. Make sure the folder after being extracted is named 'silverstripe-optimisedimages'.
  4. Place this directory in your sites root directory. This is the one with framework and cms in it.
  5. Run /dev/build on your site.

Usage

The plugin extends to the onAfterUpload method of the Image object. Whenever an Image object is uploaded it will optimise the image using the options defined in app.yaml., (*4)

There are three keys in the config that are used regardless of the optimisation provider. These are Use, SaveOriginal and OriginalDir., (*5)

Use

Use accepts two values Kraken or TinyPNG. The value is used to decide which service to use to optimise the images., (*6)

SaveOriginal

SaveOrginal accepts a boolean, if true it will keep the original image - unoptimised - at the directory specified in the OriginalDir key., (*7)

OriginalDir

OriginalDir accepts a string representing the path to the directory that the original images should be saved to. This is only used if SaveOriginal is set to true., (*8)

The Versions

23/08 2017

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

by Josh Cronin

22/08 2017
22/08 2017

1.3

1.3.0.0

  Sources   Download

MIT

The Requires

 

by Josh Cronin

22/08 2017

1.2

1.2.0.0

  Sources   Download

MIT

by Josh Cronin

22/08 2017

1.1

1.1.0.0

  Sources   Download

22/08 2017

1.0

1.0.0.0

  Sources   Download