2017 © Pedro Peláez
 

library illuminage

Wrapper for the Imagine library to hook into the Laravel framework

image

anahkiasen/illuminage

Wrapper for the Imagine library to hook into the Laravel framework

  • Thursday, August 6, 2015
  • by Anahkiasen
  • Repository
  • 4 Watchers
  • 19 Stars
  • 4,230 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 4 Forks
  • 1 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

DEPRECATED: Use Glide instead

Illuminage

Build Status Latest Stable Version Total Downloads Scrutinizer Code Quality Code Coverage, (*1)

Setup

First do composer require anahkiasen/illuminage:dev-master., (*2)

Then if you're on a Laravel app, add the following to the providers array in app/config/app.php :, (*3)

'Illuminage\IlluminageServiceProvider',

And this in the facades array in the same file :, (*4)

'Illuminage' => 'Illuminage\Facades\Illuminage',

And then do artisan asset:publish anahkiasen/illuminage., (*5)

Usage

Illuminage is a wrapper for the Imagine library to hook into the Laravel framework. It implements elegant shortcuts around Imagine and a smart cache system., (*6)

// This will create a cropped 200x300 thumb, cache it, and display it in an image tag
echo Illuminage::thumb('image.jpg', 200, 300)
// or
echo Illuminage::image('image.jpg')->thumbnail(200, 300)

// Shortcuts
echo Illuminage::square('image.jpg', 300)

What you get from those calls are not direct HTML strings but objects implementing the HtmlObject\Tag abstract, so you can use all sorts of HTML manipulation methods on them :, (*7)

$thumb = Illuminage::square('image.jpg', 200)->addClass('image-wide');
$thumb = $thumb->wrapWith('figure')->id('avatar');

echo $thumb;
// <figure id="avatar"><img class="image-wide" src="pathToThumbnail.jpg"></figure>

You can at all time access the original Imagine instance used to render the images :, (*8)

$thumb = Illuminage::image('foo.jpg')->thumbnail(200, 200);

echo $thumb->grayscale()->onImage(function($image) {
  $image->flipVertically()->rotate(45);
});

The Versions

06/08 2015

dev-master

9999999-dev

Wrapper for the Imagine library to hook into the Laravel framework

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel images thumb imagine

20/10 2014

dev-develop

dev-develop

Wrapper for the Imagine library to hook into the Laravel framework

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel images thumb imagine

20/10 2014

1.2.2

1.2.2.0

Wrapper for the Imagine library to hook into the Laravel framework

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel images thumb imagine

09/04 2014

1.2.1

1.2.1.0

Wrapper for the Imagine library to hook into the Laravel framework

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel images thumb imagine

14/01 2014

1.2.0

1.2.0.0

Wrapper for the Imagine library to hook into the Laravel framework

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel images thumb imagine

06/11 2013

1.1.0

1.1.0.0

Wrapper for the Imagine library to hook into the Laravel framework

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel images thumb imagine

27/03 2013

1.0.0

1.0.0.0

Wrapper for the Imagine library to hook into the Laravel framework

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel images thumb imagine