dev-master
9999999-dev https://github.com/aciliainternet/AssetBundleAcilia Asset Bundle
The Requires
bundle
0.4.10
0.4.10.0 https://github.com/aciliainternet/AssetBundleAcilia Asset Bundle
The Requires
bundle
Wallogit.com
2017 © Pedro Peláez
Acilia Asset Bundle
Acilia Asset Bundle for Symfony2 and symfony3, (*1)
Symfony2 and Symfony3 Asset bundle developed by Acilia Internet, (*2)
This bundle allows to upload and crop images, and save the images as an "Asset" entity on a database., (*3)
Pretty simple with Composer, run:, (*4)
composer require aciliainternet/asset-bundle
// app/AppKernel.php
public function registerBundles()
{
return array(
// ...
new Acilia\Bundle\AssetBundle\AciliaAssetBundle(),
// ...
);
}
php bin/console assets:install web/backend/
{% stylesheets
'bundles/aciliaasset/css/plugins/cropper/cropper.min.css'
filter='cssrewrite' output='css/compiled/app.css' %}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
% javascripts
'bundles/aciliaasset/js/plugins/cropper/cropper.min.js'
'bundles/aciliaasset/js/cropper.js'
'bundles/aciliaasset/js/uploader.js'
output='js/compiled/app.js' %}
{% endjavascripts %}
You must configure some parameters, (*6)
acilia_asset:
assets_images: Resources/config/images.yml # yaml file to indicate ratios and sizes
assets_dir: /var/www/media/ # path to where store the images uploaded
assets_public: /media # relative path to the images on the web server (default /media)
assets_domain: www.my-images.com # domain from which the images can be access
Image sizes file example:, (*7)
ratios: { 177: 16x9, 100: 1x1, 200: 2x1, 133: 4x3 }
renditions:
main_highlight: { large: 1200x675, medium: 1024x576, small: 640x640 }
big_cards: { large: 1200x675, medium: 1024x576, small: 640x360 }
secondary_highlight: { large: 600x338, medium: 1024x576, small: 640x360 }
entities:
card:
image:
title: Main
renditions: [ main_highlight, secondary_highlight, big_cards ]
attribute: image
serie:
main:
title: Main image
renditions: [ main_highlight, big_cards ]
attribute: picture
Acilia Asset Bundle
bundle
Acilia Asset Bundle
bundle