PHPackages                             encoda/ss-image-min - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. encoda/ss-image-min

ActiveSilverstripe-module[Caching](/categories/caching)

encoda/ss-image-min
===================

SilverStripe Image Compress and Cache module

0.1.3.x-dev(11y ago)2881[3 PRs](https://github.com/encoda/ss-image-min/pulls)MITPHP

Since Jan 26Pushed 10y ago3 watchersCompare

[ Source](https://github.com/encoda/ss-image-min)[ Packagist](https://packagist.org/packages/encoda/ss-image-min)[ Docs](http://github.com/encoda/ss-image-min)[ RSS](/packages/encoda-ss-image-min/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (6)Used By (0)

SilverStripe Image Minify Module
================================

[](#silverstripe-image-minify-module)

SS-image-min is a Silverstripe module for image compressing and server-side caching based on [nielse63/php-image-cache](https://github.com/nielse63/php-image-cache).

Requirements
------------

[](#requirements)

SilverStripe Framework 3.0+

Installation
------------

[](#installation)

After installing the module by any of the following methods you must build you database by visiting .

### Composer

[](#composer)

Create a composer.json file:

```
    {
        "require" : {
            "encoda/ss-image-min": "~0.1.3"
        }
    }
```

Navigate to your project root and run the install command.

`$ composer install`

### Github

[](#github)

Navigate to the root directory of your SilverStripe application and execute `git clone https://github.com/encoda/ss-image-min.git`

### Manually

[](#manually)

Download [this zip file](https://github.com/encoda/ss-image-min/zipball/master) and extract it in your SilverStripe root directory.

Usage
-----

[](#usage)

Once the module is installed, a compressed cache version of each Silverstripe `Image` instance file is automatically generated by the time it is saved in the database, or (if the module is lately installed in the application and there are already several images in the database) individually at the moment the URL of any of them is called directly or indirectly, by calling either one of its following methods: `getTag`, `getUrl` or `getAbsoluteURL`.

### Example

[](#example)

mysite/code/NarcissisticTeenager.php

```
