All Projects → folkloreinc → Laravel Image

folkloreinc / Laravel Image

Image manipulation library for Laravel 4 and 5 based on Imagine (https://github.com/avalanche123/Imagine) and inspired by Croppa for easy url based manipulation (with caching)

Projects that are alternatives of or similar to Laravel Image

Svelte Easy Crop
A Svelte component to crop images with easy interactions
Stars: ✭ 80 (-71.01%)
Mutual labels:  image-manipulation, crop
Pesdk Android Demo
A fully customizable photo editor for your app.
Stars: ✭ 464 (+68.12%)
Mutual labels:  image-manipulation, crop
sic
🦜 Accessible image processing and conversion from the terminal. Front-end for image-rs/image.
Stars: ✭ 96 (-65.22%)
Mutual labels:  crop, image-manipulation
React Easy Crop
A React component to crop images/videos with easy interactions
Stars: ✭ 1,093 (+296.01%)
Mutual labels:  image-manipulation, crop
Nova Advanced Image Field
🌄📐 A Laravel Nova advanced image field with cropping and resizing using Cropper.js and Intervention Image
Stars: ✭ 67 (-75.72%)
Mutual labels:  laravel, crop
FotoKilof
GUI for ImageMagick
Stars: ✭ 114 (-58.7%)
Mutual labels:  crop, image-manipulation
node-imaginary
Minimalist node.js command-line & programmatic API client for imaginary
Stars: ✭ 94 (-65.94%)
Mutual labels:  crop, image-manipulation
Laravel Gamp
📊 Laravel Google Analytics Measurement Protocol Package
Stars: ✭ 271 (-1.81%)
Mutual labels:  laravel
Mantis
A photo cropping tool which mimics Photo.app written by Swift.
Stars: ✭ 270 (-2.17%)
Mutual labels:  crop
Nova Tabs
Laravel Nova Tabs Package
Stars: ✭ 265 (-3.99%)
Mutual labels:  laravel
Blade Extensions
Laravel Blade extensions like $loop->odd/$loop->index in foreach, view blocks and partials, etc
Stars: ✭ 267 (-3.26%)
Mutual labels:  laravel
Alfred Laravel Docs
An ultra-fast Laravel docs search workflow for Alfred 3+.
Stars: ✭ 270 (-2.17%)
Mutual labels:  laravel
Snipe Migrations
Blazing fast database migrations for Laravel tests.
Stars: ✭ 275 (-0.36%)
Mutual labels:  laravel
Laravel Eloquent Join
This package introduces the join magic for eloquent models and relations.
Stars: ✭ 270 (-2.17%)
Mutual labels:  laravel
Laravel Favicon
Create dynamic favicons based on your environment settings.
Stars: ✭ 276 (+0%)
Mutual labels:  laravel
Eloquent Power Joins
The Laravel magic you know, now applied to joins.
Stars: ✭ 264 (-4.35%)
Mutual labels:  laravel
Laravel Vue
运用laravel5.4 + vue2.0 + elementui
Stars: ✭ 276 (+0%)
Mutual labels:  laravel
Laravel Translator
An Eloquent translator for Laravel
Stars: ✭ 275 (-0.36%)
Mutual labels:  laravel
Manaphp
ManaPHP Framework: Swoole+FPM
Stars: ✭ 271 (-1.81%)
Mutual labels:  laravel
Tlint
Tighten linter for Laravel conventions
Stars: ✭ 274 (-0.72%)
Mutual labels:  laravel

Laravel Image

Laravel Image is an image manipulation package for Laravel 4 and 5 based on the PHP Imagine library. It is inspired by Croppa as it can use specially formatted urls to do the manipulations. It supports basic image manipulations such as resize, crop, rotation and flip. It also supports effects such as negative, grayscale, gamma, colorize and blur. You can also define custom filters for greater flexibility.

Latest Stable Version Build Status Total Downloads

The main difference between this package and other image manipulation libraries is that you can use parameters directly in the url to manipulate the image. A manipulated version of the image is then saved in the same path as the original image, creating a static version of the file and bypassing PHP for all future requests.

For example, if you have an image at this URL:

/uploads/photo.jpg

To create a 300x300 version of this image in black and white, you use the URL:

/uploads/photo-image(300x300-crop-grayscale).jpg

To help you generate the URL to an image, you can use the Image::url() method

Image::url('/uploads/photo.jpg',300,300,array('crop','grayscale'));

or

<img src="<?=Image::url('/uploads/photo.jpg',300,300,array('crop','grayscale'))?>" />

Alternatively, you can programmatically manipulate images using the Image::make() method. It supports all the same options as the Image::url() method.

Image::make('/uploads/photo.jpg',array(
	'width' => 300,
	'height' => 300,
	'grayscale' => true
))->save('/path/to/the/thumbnail.jpg');

or use directly the Imagine library

$thumbnail = Image::open('/uploads/photo.jpg')
			->thumbnail(new Imagine\Image\Box(300,300));

$thumbnail->effects()->grayscale();
	
$thumbnail->save('/path/to/the/thumbnail.jpg');

Features

This package use Imagine for image manipulation. Imagine is compatible with GD2, Imagick, Gmagick and supports a lot of features.

This package also provides some common filters ready to use (more on this):

  • Resize
  • Crop (with position)
  • Rotation
  • Black and white
  • Invert
  • Gamma
  • Blur
  • Colorization
  • Interlace

Version Compatibility

Laravel Image
4.2.x 0.1.x
5.0.x 0.2.x
5.1.x 0.3.x
5.2.x 0.3.x

Installation

Dependencies:

Server Requirements:

Installation:

1- Require the package via Composer in your composer.json.

{
	"require": {
		"folklore/image": "0.3.*"
	}
}

2- Run Composer to install or update the new requirement.

$ composer install

or

$ composer update

3- Add the service provider to your app/config/app.php file

'Folklore\Image\ImageServiceProvider',

4- Add the facade to your app/config/app.php file

'Image' => 'Folklore\Image\Facades\Image',

5- Publish the configuration file and public files

$ php artisan vendor:publish --provider="Folklore\Image\ImageServiceProvider"

6- Review the configuration file

app/config/image.php

Documentation

Roadmap

Here are some features we would like to add in the future. Feel free to collaborate and improve this library.

  • More built-in filters such as Brightness and Contrast
  • More configuration when serving images
  • Artisan command to manipulate images
  • Support for batch operations on multiple files
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].