cpCloudFrontPlugin - 0.1.6

Provides helper methods to includes assets stored in AWS's CloudFront service.

You are currently browsing
the website for symfony 1

Visit the Symfony2 website

« Back to the Plugins Home


Forgot your password?
Create an account



advanced search
Information Readme Releases Changelog Contribute
Show source


The cpCloudFrontPlugin is a symfony plugin that provides a helper to include into your pages images that are stored on AWS's CloudFront service.


  • Install the plugin (via a package)

    symfony plugin:install sfCloudFrontPlugin
  • Install the plugin (via a Subversion checkout)

    svn co http//svn.symfony-project.com/plugins/cpCloudFrontPlugin/trunk plugins/cpCloudFrontPlugin
  • Activate the plugin in the config/ProjectConfiguration.class.php

    class ProjectConfiguration extends sfProjectConfiguration
      public function setup()
  • Enable the plugin and provide the relevant settings in your app's config/app.yml file:

              enable: true
              url: http://assets.myapp.com
              images_prefix: /images


The plugin provides 2 helper methods:

  • cloudfront_image_tag is a replacement for the image_tag helper method. It accepts the same parameters.

    echo cloudfront_image_tag($source, $options);
  • cloudfront_submit_image_tag is a replacement for the submit_image_tag helper method. It accepts the same parameters.

    echo cloudfront_submit_image_tag($source, $options);