avalanche123 / AvalancheImagineBundle

Image manipulation using Imagine and Twig Filters
MIT License
321 stars 166 forks source link

Combine Imagine with Assetic #141

Open smurfy opened 11 years ago

smurfy commented 11 years ago

Hi,

i'm quite a fan of assetic and imagine and already wrote an addon for assetic (https://github.com/smurfy/SmurfyAsseticCssBundleImagesBundle)

I'm now running into an usecase that i want to do use css sprite maps, but this spritemaps needs to be converted and resized :).

So i thought about using imagine for that (i already using it for something else) but now have to problem how to use it easily with css.

So i'm thinking about somehow combine assetic and imagine.

Main challange would be getting the imagine filtername to assetic. i thought about filename/basepath mapping but thats not really clean. (i use file extension in my bundle, but thats not enought info) another solution could be using dynamic assetic filter names based on filters created in imagine, with a prefix. (needs some research)

Just want to ask if this is in any way interesting for you (i could write the code for it, but i want to create a clean and nice solution, as pull request or a seperate bundle)

smurfy commented 11 years ago

Ok i did a first prototype:

smurfy@07c89d9f097426f7eb3283ab912c733cb86bedb8