Open
Description
Hi,
I'm interested in optimizing my rendered images using a kind of optimizer like jpegoptim
.
I have thought in using assetic
filters like here:
<img src="{{ jpegoptim('@AcmeFooBundle/Resources/public/images/example.jpg') }}" alt="Example"/>
but that syntax is colliding with ImagineBundle syntax:
<img src="{{ image(...
Well, I say "colliding" because I have tried this:
<img src="{{ jpegoptim(" {{ image('images/' ~ producto.imageName).scaleResize(null, 450) }} ") }}" />
and I get this:
An exception has been thrown during the rendering of a template ("Unable to generate a URL for the named route "_assetic_768aa82" as such route does not exist.")
I have been thinking in creating a custom filter that includes the jpegoptim optimization process, and that could be concatenate to the rest of the filters:
scaleResize(null, 450).MyOptimFilter
Any advice to get image optimization using in the same time ImagineBundle filters?
Metadata
Metadata
Assignees
Labels
No labels