how to use assets_base_urls when applying filters #113

Closed
ErikTrapman opened this Issue Jan 8, 2013 · 4 comments

Comments

Projects
None yet
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

This comment has been minimized.

Show comment
Hide comment
@avalanche123

avalanche123 Jan 8, 2013

Owner

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

Owner

avalanche123 commented Jan 8, 2013

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

@ErikTrapman

This comment has been minimized.

Show comment
Hide comment
@ErikTrapman

ErikTrapman Jan 9, 2013

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

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

This comment has been minimized.

Show comment
Hide comment
@avalanche123

avalanche123 Jan 21, 2013

Owner

were you able to solve this issue?

Owner

avalanche123 commented Jan 21, 2013

were you able to solve this issue?

@ErikTrapman

This comment has been minimized.

Show comment
Hide comment
@ErikTrapman

ErikTrapman Jan 22, 2013

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.

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.

Bluestart83 pushed a commit to Bluestart83/AvalancheImagineBundle that referenced this issue Jun 10, 2013

Merge pull request #113 from kevarch/master
Properly set config parameter in the container
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment