Disable media 'optimazation'
Closed this issue · 4 comments
chielsen commented
I don't want to ruin my images. By default it will run all images through the filters, but thusfar i have not found a way to disable running the default filters as i cannot unset the key and setting the filter null will just run the previously used filer (bug?).
Am i missing something or could this be added?
neilime commented
Hi,
In your assets_bundle config, you can disabled filters for image :
'filters' => array(
'png' => null,
'jpg' => null, 'jpeg' => null,
'gif' => null,
),
You can try this config.
neilime commented
Does it work for you ?
chielsen commented
'filters' => [
'jpg' => new \Zend\Stdlib\ArrayUtils\MergeRemoveKey(),
'jpeg' => new \Zend\Stdlib\ArrayUtils\MergeRemoveKey(),
],
This works for me.
neilime commented
Thank you, I've added this trick to FAQ : https://github.com/neilime/zf2-assets-bundle/wiki/FAQ#how-to-disable-media-optimization