Download the PHP package ed.sukharev/twig-picture-extension without Composer
On this page you can find all versions of the php package ed.sukharev/twig-picture-extension. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download ed.sukharev/twig-picture-extension
More information about ed.sukharev/twig-picture-extension
Files in ed.sukharev/twig-picture-extension
Download ed.sukharev/twig-picture-extension
More information about ed.sukharev/twig-picture-extension
Files in ed.sukharev/twig-picture-extension
Vendor ed.sukharev
Package twig-picture-extension
Short Description A Twig extension to generate picture tags
License MIT
Homepage https://github.com/eduard-sukharev/TwigPictureExtension
Package twig-picture-extension
Short Description A Twig extension to generate picture tags
License MIT
Homepage https://github.com/eduard-sukharev/TwigPictureExtension
Please rate this library. Is it a good library?
Informations about the package twig-picture-extension
TwigPictureExtension
A custom twig extension to add
Installation
Add the library to your app's composer.json
:
Add the extension to the Twig_Environment
:
Usage
The extension provides a picture
twig function, which generates a picture tag with a set of sources and fallback img tag:
Which creates following output:
Arguments
The picture
function accepts 3 arguments:
- filename: The filename of original image. Picture function substitutes the extension with appropriate when needed.
- alt: This is alternative text to be shown when image not available. Required so that you don't forget to add it.
- imgClasses: Array of strings to be added to
class
attribute of fallbackimg
tag.
Symfony2
Add a service manually
All versions of twig-picture-extension with dependencies
PHP Build Version
Package Version
The package ed.sukharev/twig-picture-extension contains the following files
Loading the files please wait ....