Skip to main content

Symfony Medianova CDN Integration

Symfony is an open-source PHP MVC web application framework. Thanks to the Assetic feature, CSS, JavaScript, and images can be organized in a much easier and more organized way. In this article, we discuss the process of enabling Medianova CDN for your Symfony applications. The only need for integration is to set the base URL of your assets.

  1. First, create the account for Small and Large asset in https://cloud.medianova.com .

  2. And then define the base URL app/config/config.yml config file.

  • Symfony 2.6

CODE
framework:
    templating:
        assets_base_urls:
            http: ['http://img-medianova.mncdn.com']
  • Symfony 2.7

CODE
framework:
    assets:
        base_urls: ['http://img-medianova.mncdn.com']
  1. Add your assets like this.

CODE
<img src="{{ asset('image.jpeg') }}" alt="Medianova " >
  1. Check in the HTML source code if the URL of your assets is pointing correctly to Medianova CDN.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.