title: Sonata media Liip Imagine Integration
body: <p>I am trying use Liip Imagine for generate thumbnails with Sonata Media following integration instructions:</p>
  
  <p><a href="http://sonata-project.org/bundles/media/master/doc/reference/extra.html#liip-imagine-bundle-integration" rel="nofollow">http://sonata-project.org/bundles/media/master/doc/reference/extra.html#liip-imagine-bundle-integration</a></p>
  
  <p>But I can't get correct path for the reference image and thumbnails at same time. I think my problem is with this configuration point:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>With original config for Sonata media</p>
  
  <pre><code>cdn:
      path: /uploads/media
  </code></pre>
  
  <p>The reference image url is OK but thumbs dont generate and their url are like:</p>
  
  <pre><code>/uploads/media/app_dev.php/uploads/media/cache/product/0001/01/18_product_small.jpg
  </code></pre>
  
  <p>Following integration instructions:</p>
  
  <pre><code>cdn:
      path: http://myapp.test
  </code></pre>
  
  <p>where myapp.test point to my base root app with default htaccess of symfony the thumbs are generated correctly with public url like:</p>
  
  <pre><code>http://myapp.test/app_dev.php/uploads/media/cache/product/0001/01/18_product_small.jpg
  </code></pre>
  
  <p>but the public url of the reference image is:</p>
  
  <pre><code>http://myapp.test/product/0001/01/113835a6853a.jpeg
  </code></pre>
  
  <p>that dont exist, the correct url is:</p>
  
  <pre><code>http://myapp.test/uploads/media/product/0001/01/113835a6853a.jpeg
  </code></pre>
  
  <p>All this urls are copied from sonata admin.</p>
  
  <p>Appart of follow liipimagine integration instructions maybe a need touch something else for get correct reference image url?</p>
  
  <p>I am using:</p>
  
  <pre><code>    "php": "&gt;=5.3.3",
      "symfony/symfony": "2.3.*",
      "doctrine/orm": "&gt;=2.2.3,&lt;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"
  </code></pre>