orchestra/imagine

Imagine (Wrapper) Component for Laravel 5
226,587 66
Install
composer require orchestra/imagine
Latest Version:v6.0.0
PHP:^7.4 || ^8.0
License:MIT
Last Updated:Apr 17, 2021
Links: GitHub  ·  Packagist
Maintainer: crynobone

Imagine (Wrapper) Component for Laravel

Imagine (Wrapper) Component is a Laravel package wrapper for Imagine.

tests Latest Stable Version Total Downloads Latest Unstable Version License

Version Compatibility

Laravel Imagine
5.5.x 3.5.x
5.6.x 3.6.x
5.7.x 3.7.x
5.8.x 3.8.x
6.x 4.x
7.x 5.x
8.x 6.x

Installation

To install through composer, run the following command from terminal:

composer require "orchestra/imagine"

Configuration

Add Orchestra\Imagine\ImagineServiceProvider service provider in config/app.php.

'providers' => [

    // ...

    Orchestra\Imagine\ImagineServiceProvider::class,
],

Add Imagine alias in config/app.php.

'aliases' => [

    // ...

    'Imagine' => Orchestra\Imagine\Facade::class,
],

Usage

Here a simple example how to create a thumbnail from an image:

<?php

use Imagine\Image\ImageInterface;
use Orchestra\Imagine\Jobs\CreateThumbnail;

dispatch(new CreateThumbnail([
    'path' => $path,
    'filename' => $filename, // filename without extension
    'extension' => $extension,
    'format' => '{filename}.thumb.{extension}',
    'dimension' => 320, // width and height will be 320.
    'mode' => ImageInterface::THUMBNAIL_OUTBOUND,
    'filter' => ImageInterface::FILTER_UNDEFINED,
]));

Related Packages

dinghua/crm

CMS Extension for Orchestra Platform

2 0
orchestra/transporter

Migration Toolkit: Creating ORM Compatible Structure from Legacy Database

141 2
orchestra/extension

Extension Component for Orchestra Platform

97,747 4
orchestra/story

CMS Extension for Orchestra Platform

9,988 14
unicorn/lumen-testbench-core

Lumen fork of orchestra/testbench-core - Testing Helper for Lumen Development

1,231 0