Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[proposal] add default resizer and default resizer adapter #700

Closed
hanovruslan opened this issue Jan 22, 2015 · 0 comments · Fixed by #1108
Closed

[proposal] add default resizer and default resizer adapter #700

hanovruslan opened this issue Jan 22, 2015 · 0 comments · Fixed by #1108

Comments

@hanovruslan
Copy link
Contributor

for now any kind of media providers works with GD resizer adapter by default so if you want to switch to imagick for example you need to add some overcomplicated lines into config like

sonata_media:
    # ... 
    providers:
        vimeo:
            resizer: some_bundle_config_path.resizer.simple
        youtube:
            resizer: some_bundle_config_path.resizer.simple
        dailymotion:
            resizer: some_bundle_config_path.resizer.simple
        image:
            resizer: some_bundle_config_path.resizer.simple
            adapter: sonata.media.adapter.image.imagick

also in some_bundle config

services:
    some_bundle_config_path.resizer.simple:
        class: %sonata.media.resizer.simple.class%
        arguments:
            - @sonata.media.adapter.image.imagick
            - %sonata.media.resizer.square.adapter.mode%
            - @sonata.media.metadata.proxy

what if just add some default resizer and resizer adapter (config yaml and Configuration processor) in purpose to simplify this feature to this by config lines like these

sonata_media:
    adapters:
        default: sonata.media.adapter.image.imagick
    resizers:
        default:  sonata.media.resizer.simple # sonata.media.resizer.square or some_bundle_config_path.some_resizer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants