Media Sonatas Liip Imagine Integration

I am trying to use Liip Imagine to sketch with Sonata Media after the integration instructions:

http://sonata-project.org/bundles/media/master/doc/reference/extra.html#liip-imagine-bundle-integration

But I cannot get the right path for the reference image and thumbnails at the same time. I think my problem is with this configuration point:

cdn:
    # The CDN part must point to the base root of your application with a valid htaccess to match non existant
    # file. The non existant image will be send to the SonataMediaBundle:Media:liipImagineFilter controller.
    server:
        path:      http://mydomain.com

With initial configuration for sonata media p>

cdn:
    path: /uploads/media

The sample link image is fine, but the thumbs are not generated, and their URL looks like this:

/uploads/media/app_dev.php/uploads/media/cache/product/0001/01/18_product_small.jpg

Following the integration instructions:

cdn:
    path: http://myapp.test

where myapp.test points to my base root application with htaccess by default for symfony, thumbs are generated correctly with the public url:

http://myapp.test/app_dev.php/uploads/media/cache/product/0001/01/18_product_small.jpg

URL- :

http://myapp.test/product/0001/01/113835a6853a.jpeg

, URL-:

http://myapp.test/uploads/media/product/0001/01/113835a6853a.jpeg

URL- .

liipimagine, , - URL- ?

:

    "php": ">=5.3.3",
    "symfony/symfony": "2.3.*",
    "doctrine/orm": ">=2.2.3,<2.4-dev",
    "doctrine/doctrine-bundle": "1.2.*",
    "twig/extensions": "1.0.*",
    "symfony/assetic-bundle": "2.3.*",
    "symfony/swiftmailer-bundle": "2.3.*",
    "symfony/monolog-bundle": "2.3.*",
    "sensio/distribution-bundle": "2.3.*",
    "sensio/framework-extra-bundle": "2.3.*",
    "sensio/generator-bundle": "2.3.*",
    "incenteev/composer-parameter-handler": "~2.0",
    "sonata-project/admin-bundle": "dev-master",
    "sonata-project/doctrine-orm-admin-bundle": "dev-master",
    "sonata-project/intl-bundle": "dev-master",
    "sonata-project/media-bundle": "dev-master",
    "sonata-project/core-bundle": "dev-master",
    "a2lix/translation-form-bundle": "dev-master",
    "knplabs/doctrine-behaviors": "dev-master",
    "doctrine/doctrine-fixtures-bundle": "dev-master",
    "stfalcon/tinymce-bundle": "dev-master",
    "tilleuls/ckeditor-sonata-media-bundle": "dev-master",
    "egeloen/ckeditor-bundle": "2.*",
    "gedmo/doctrine-extensions": "dev-master",
    "friendsofsymfony/jsrouting-bundle": "1.*@dev",
    "asm/translation-loader-bundle": "~1.0",
    "lunetics/locale-bundle": "2.2.*",
    "craue/twigextensions-bundle": "~1.0",
    "sonata-project/formatter-bundle": "dev-master",
    "pixassociates/sortable-behavior-bundle": "dev-master",
    "liip/imagine-bundle": "dev-master"
+4
1

, :

cdn:
    server:
        path: ''

- google-, . , - .

:

  • sonata-project/admin-bundle 2.3.1
  • sonata-project/media-bundle 2.3.1
  • liip/imag-bundle 0.21.1

N.B. , liipimaginebundle 0. *, 1. * ( , )

+1

Source: https://habr.com/ru/post/1531758/


All Articles