Download the PHP package irishdan/responsive-image-bundle without Composer
On this page you can find all versions of the php package irishdan/responsive-image-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download irishdan/responsive-image-bundle
More information about irishdan/responsive-image-bundle
Files in irishdan/responsive-image-bundle
Package responsive-image-bundle
Short Description A bundle for creating styled and responsive images for symfony projects
License MIT
Homepage http://danbyrne.me/projects/responsive-image-bundle
Informations about the package responsive-image-bundle
ResponsiveImageBundle
Overview:
The ResponsiveImageBundle adds the ability to easily create styled and responsive images (scaled, cropped, greyscale) in Symfony3. Responsive images are generated as <picture> tags or as <mg> tags with sizes and scrset attributes.
A crop and focus area widget is also provided to ensure that cropped images always include the most important part of the image.
The bundle uses FlySystem filesystem abstraction layer giving you control over where images are stored. Events are used to drive the system, giving more flexibiltiy and the ability to implement queuing of intensive image processing.
Features
- Image objects are stored via Doctrine ORM
- Handles uploading images to a "FlySystem" filesystem
- Images styles are defined in configuration.
- Breakpoints and pictures sets are defined in configuration
- Handles creation of styled images on the fly (as they are viewed) if using a local filesystem
- Includes a widget to define an image's crop and focus areas giving art direction to styled images
Quick and basic setup
Out of the box, ResponsiveImage bundle should work with minimal configuration.
Step 1: Download, enable the bundle and import its services and configuration
Download with composer
Enable the bundle and OneupFlysystem in the kernel
Step 2: Import its services, default configuration and the local image routing
Import responsive image services, default and filesystem configuration.
Import the routing for local on the fly image generation.
Step 3: ResponsiveImage entity and it's CRUD.
With the generated image art direction' to images.
Step 4: Define some image styles in your configuration file. (Usually config.yml)
You can now render a styled in your twig template like so:
Step 5: Define some breakpoints and "picture sets"
You can now render <picture> responsive background image css in twig templates
Step 6: Define some size sets
You can now render <img> responsive images width srcset and sizes attributes in twig templates.
Documentation
- Installation and Setup
- Filesystems
- Image entities
- Uploading
- Styled image generation
- Image rendering
- Art Direction
- Commands
- Configuration
- Urls
- Events
- Tests
Attribution
- Intervention is the standalone PHP Imagine Library is used by this bundle for image transformations
- OneupFlysystemBundle which used Flysystem filesystem astraction library, is required by this bundle
- The CropFocus art direction widget javascript was created by following this TutsPlus tutorial
All versions of responsive-image-bundle with dependencies
doctrine/doctrine-bundle Version ^1.6
doctrine/orm Version ^2.5
intervention/image Version ^2.3
oneup/flysystem-bundle Version ^1.13
symfony/framework-bundle Version ^3.2
symfony/twig-bundle Version ^3.2
symfony/validator Version ^3.2
symfony/property-access Version ^3.2
symfony/monolog-bundle Version ^2.8
sensio/generator-bundle Version ^3.0