Skip to content

Loading…

how to use assets_base_urls when applying filters #113

Closed
ErikTrapman opened this Issue · 4 comments

2 participants

@ErikTrapman

I'm having trouble using the filter in a project where i have an assets_base_urls-configuration defined: http://symfony.com/doc/current/reference/configuration/framework.html#assets-base-urls

The use-case is to have a CDN for displaying a lot of images, but the filter creates a relative url, with the full asset path attached to it looking like this:

http://myproject/media/cache/filter_name/http://cdn.myproject/assets/media/originals/1.png.

How can i solve this? Maybe use a correct path setting in my config?

@avalanche123
Owner

use it like this asset('images/logo.png' | apply_filter('my_thumb'))

@ErikTrapman

Hmmm i get the idea. But it's not quite the fix.

2 problems still, and i'm testing with assets_base_urls set to the same url as my project, nothing fancy.

  1. The file is not cached anymore. No new cache-entries appear.
  2. The URL now looks like this: http://myproject/media/originals//media/cache/filter_name/1.png
@avalanche123

were you able to solve this issue?

@ErikTrapman

Unfortunately not, the url stays the same as i described. I haven't had the time to create a fresh project with only this bundle and a setup with an assets_base_urls. So it could be the plugin, or it's my complicated project (one i did not set up myself even!).

If you're 100% positive it should work with your suggestion you can close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.