2017 © Pedro Peláez
 

symfony-bundle image-bundle

An image editing bundle using PHP's GD library if other solutions fail for some reason.

image

shadesoft/image-bundle

An image editing bundle using PHP's GD library if other solutions fail for some reason.

  • Tuesday, June 5, 2018
  • by subbysnake
  • Repository
  • 1 Watchers
  • 1 Stars
  • 50 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 6 Versions
  • 25 % Grown

The README.md

Image Bundle for Symfony

ABANDONED - Please use GDImage instead., (*1)

An image editing bundle using PHP's GD library if other solutions fail for some reason., (*2)

Latest Stable Version Build Status StyleCI Total Downloads License, (*3)

Installation

Step 1: Download the Bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:, (*4)

$ composer require shadesoft/image-bundle

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation., (*5)

Step 2: Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles in the app/AppKernel.php file of your project:, (*6)

<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...

            new ShadeSoft\ImageBundle\ShadeSoftImageBundle(),
        );

        // ...
    }

    // ...
}

Usage:

Usage with PHP

<?php
// src/Acme/DemoController.php

// ...
class DemoController extends Controller
{
    public function DemoAction(Request $request) {
        $img = '../../web/assets/temp.jpg';

        $imgSizer = $this->get('shadesoft_image.sizer');

        $imgSizer->thumbnail($img, 400, 300);
    }
}

Usage with Twig

{{ asset('/path/to/image'|thumbnail(400, 300)) }}
{# recommended to use with cache functionality enabled, see below #}

For usage details, please check the 'Parameters' and 'Available functions' sections of the shadesoft/gd-image documentation., (*7)

Cache

To enable cache, you just need to configure the bundle like below:, (*8)

# app/config/config.yml for Symfony 2/3, and config/packages/shade_soft_image.yaml for Symfony 4

shade_soft_image:
    cache_directory: /path/to/desired/cache/directory

The Versions

05/06 2018

dev-dev

dev-dev https://github.com/ShadeSoft/ImageBundle

An image editing bundle using PHP's GD library if other solutions fail for some reason.

  Sources   Download

MIT

The Requires

 

The Development Requires

bundle symfony image gd picture

26/04 2018

dev-master

9999999-dev https://github.com/ShadeSoft/ImageBundle

An image editing bundle using PHP's GD library if other solutions fail for some reason.

  Sources   Download

MIT

The Requires

 

The Development Requires

bundle symfony image gd picture

24/04 2018

v1.0.3

1.0.3.0 https://github.com/ShadeSoft/ImageBundle

An image editing bundle using PHP's GD library if other solutions fail for some reason.

  Sources   Download

MIT

The Requires

 

The Development Requires

bundle symfony image gd picture

23/01 2018

v1.0.2

1.0.2.0 https://github.com/ShadeSoft/ImageBundle

An image editing bundle using PHP's GD library if other solutions fail for some reason.

  Sources   Download

MIT

The Requires

 

bundle symfony image gd picture

22/01 2018

v1.0.1

1.0.1.0 https://github.com/ShadeSoft/ImageBundle

An image editing bundle using PHP's GD library if other solutions fail for some reason.

  Sources   Download

MIT

The Requires

 

bundle symfony image gd picture

20/12 2017

v1.0

1.0.0.0 https://github.com/ShadeSoft/ImageBundle

An image editing bundle using PHP's GD library if other solutions fail for some reason.

  Sources   Download

MIT

The Requires

 

bundle symfony image gd picture