Take the 2-minute tour ×

Is there a way I can extend Assetic so it will allow me to have it load my images from a CDN which I configure somewhere else. If I can write a plugin/extension/event listener/etc which allows fine-grain control, that would be awesome.

Likewise, are there any hooks for the assetic:dump console command which I could use so when I perform a dump I can automatically push images from the local box to the CDN (since I want the images to load locally on dev)?

Basically, I want to be able to have an images sitting somewhere in on my local machine, say: web/images/image.png

On dev, when I do something like:


It would spit out a URL like this on dev:

And on production it'd spit out something like:


And when I run assetic:dump, the image is automatically uploaded.


share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Check out this link: http://symfony.com/doc/master/reference/configuration/framework.html#assets-base-urls

You can add a base url in your config.yml like:

            http: my.cdn.net
share|improve this answer
Sorry for the slow reply. That looks like it might do the trick, or at the very least point me in the proper direction. Thanks. –  samanime Jan 18 '13 at 19:24
add comment

Your Answer


