2017 © Pedro Peláez
 

symfony-bundle image-bundle

Provide simple image utilities for resizing

image

elendev/image-bundle

Provide simple image utilities for resizing

  • Monday, March 13, 2017
  • by Elendev
  • Repository
  • 3 Watchers
  • 2 Stars
  • 369 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 15 Versions
  • 1 % Grown

The README.md

ElendevImageBundle

Bundle configuration

elendev_image:
    cache_dir: 'path_to_cache_directory'
    source_dir: 'path_to_image_dir'
    cache_url: 'url/to/cache/dir'

The cache_dir configuration key is the local path to the cache directory. It's the directory where the generated files will be stored (for example : /var/www/my-website/media/cache)., (*1)

The source_dir configuration key is the local path to the directory containing the images (for example : /var/www/my-website/media/original-files)., (*2)

The cache_url configuration key is the url to the cache directory. If the url http://www.my-website.com redirect to the local /var/www/my-website directory, the value of this configuration key would be http://www.my-website.com/media/cache., (*3)

Use Twig's extension image method

<img src="{{image('source')}}"/>, (*4)

<img src="{{image('source').resize(200, 200)}}"/>, (*5)

<img src="{{image('source').rotate(180).greyScale()}}"/>, (*6)

The available methods are those of the Elendev\ElendevImageBundle\ImageProxy class :, (*7)

interface ImageProxy {

    ...

    public function resize($width, $height, $keepRatio = true, $allowEnlarge = false);

    /**
     * @param type $degree
     * @param type $bgcolor background color for visible parts, by default black
     */
    public function rotate($degree, $bgcolor = 0);

    /**
     * Do greyscale on picture
     */
    public function greyScale();

    ...

}

The Versions

13/03 2017

dev-master

9999999-dev http://blog.elendev.com

Provide simple image utilities for resizing

  Sources   Download

Apache2

The Requires

 

The Development Requires

by Jonas Renaudot

image twig filter

13/03 2017

1.1.10

1.1.10.0 http://blog.elendev.com

Provide simple image utilities for resizing

  Sources   Download

Apache2

The Requires

 

The Development Requires

by Jonas Renaudot

image twig filter

12/10 2016

1.1.9

1.1.9.0 http://blog.elendev.com

Provide simple image utilities for resizing

  Sources   Download

Apache2

The Requires

 

The Development Requires

by Jonas Renaudot

image twig filter

27/01 2015

1.1.8

1.1.8.0 http://blog.elendev.com

Provide simple image utilities for resizing

  Sources   Download

Apache2

The Requires

 

The Development Requires

by Jonas Renaudot

image twig filter

11/08 2014

1.1.7

1.1.7.0 http://blog.elendev.com

Provide simple image utilities for resizing

  Sources   Download

Apache2

The Requires

 

The Development Requires

by Jonas Renaudot

image twing filter

30/12 2013

1.1.6

1.1.6.0 http://blog.elendev.com

Provide simple image utilities for resizing

  Sources   Download

Apache2

The Requires

 

The Development Requires

by Jonas Renaudot

image twing filter

29/09 2013

1.1.5

1.1.5.0 http://blog.elendev.com

Provide simple image utilities for resizing

  Sources   Download

Apache2

The Requires

 

The Development Requires

by Jonas Renaudot

image twing filter

08/09 2013

1.1.4

1.1.4.0 http://blog.elendev.com

Provide simple image utilities for resizing

  Sources   Download

Apache2

The Requires

 

The Development Requires

by Jonas Renaudot

image twing filter

24/02 2013

1.1.3

1.1.3.0 http://blog.elendev.com

Provide simple image utilities for resizing

  Sources   Download

Apache2

The Requires

 

The Development Requires

by Jonas Renaudot

image twing filter

20/01 2013

1.1.2

1.1.2.0 http://blog.elendev.com

Provide simple image utilities for resizing

  Sources   Download

Apache2

The Requires

 

The Development Requires

by Jonas Renaudot

image twing filter

12/12 2012

1.1.1

1.1.1.0 http://blog.elendev.com

Provide simple image utilities for resizing

  Sources   Download

Apache2

The Requires

 

The Development Requires

by Jonas Renaudot

image twing filter

12/12 2012

1.1.0

1.1.0.0 http://blog.elendev.com

Provide simple image utilities for resizing

  Sources   Download

Apache2

The Requires

 

The Development Requires

by Jonas Renaudot

image twing filter

16/11 2012

1.0.2

1.0.2.0 http://blog.elendev.com

Provide simple image utilities for resizing

  Sources   Download

Apache2

The Requires

 

The Development Requires

by Jonas Renaudot

image twing filter

30/09 2012

1.0.1

1.0.1.0 http://blog.elendev.com

Provide simple image utilities for resizing

  Sources   Download

Apache2

The Requires

 

The Development Requires

by Jonas Renaudot

image twing filter

18/09 2012

1.0.0

1.0.0.0 http://blog.elendev.com

Provide simple image utilities for resizing

  Sources   Download

Apache2

The Requires

 

The Development Requires

by Jonas Renaudot

image twing filter