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.
First, create the account for Small and Large asset in https://cloud.medianova.com .
And then define the base URL app/config/config.yml config file.
Symfony 2.6
framework:
templating:
assets_base_urls:
http: ['http://img-medianova.mncdn.com']
Symfony 2.7
framework:
assets:
base_urls: ['http://img-medianova.mncdn.com']
Add your assets like this.
<img src="{{ asset('image.jpeg') }}" alt="Medianova " >
Check in the HTML source code if the URL of your assets is pointing correctly to Medianova CDN.