Skip to content
This repository has been archived by the owner on Oct 10, 2019. It is now read-only.
neilime edited this page Aug 30, 2016 · 3 revisions

Filters

How to disable media optimization

In the assets_bundle configuration, you can disabled filters for image :

    'filters' => array(
        'png' => new \Zend\Stdlib\ArrayUtils\MergeRemoveKey(),
        'jpg' => new \Zend\Stdlib\ArrayUtils\MergeRemoveKey(), 'jpeg' => new \Zend\Stdlib\ArrayUtils\MergeRemoveKey(),
        'gif' => new \Zend\Stdlib\ArrayUtils\MergeRemoveKey(),
    ),

How to change Javascript compressor

In the assets_bundle configuration, you can define which js filter you want to use in configuration

    'filters' => array(
            \AssetsBundle\AssetFile\AssetFile::ASSET_JS => 'JsMinAssetFileFilter',
        ),
    ),

Common errors

"/my/file/path.jpeg" has not been cached as file

Every media that are called into you stylesheets must be cached, you should define them the assets_bundle configuration :

    'assets' => array(           
        'media' => array(
            '/my/file/path.jpeg',
        ),
    ),