New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

yaro/cropp

Image manipulations on-the-fly for Laravel 5
91 6

Larablocks Analysis

yaro/cropp works with any PHP project: the latest release (0.1.1, Jan 31, 2016) doesn't depend on Laravel.

Recommendation checks

Not advised

Not advised: no release or commit in over 2 years.

  • No release or commit in over 2 years
  • No release in the last 12 months (last: Jan 31, 2016)
  • 0 downloads a month (needs 10,000)
  • 6 GitHub stars (needs 100)

State

Likely abandoned
  • No release or commit in over 2 years.
  • Last stable release: Jan 31, 2016.
  • No releases in the last 12 months.
  • First released: Jul 12, 2015.
  • 0 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Dec 2, 2026.

Install
composer require yaro/cropp
Latest Version:0.1.1
License:MIT
Last Updated:Jan 31, 2016
Links: GitHub  ·  Packagist
Maintainer: Cherry Pie

Cropp

Laravel 5 package for image manipulations on-the-fly.

Installation

You can install the package through Composer.

composer require yaro/cropp

You must install this service provider.

// Laravel 5: config/app.php
'providers' => [
    //...
    Yaro\Cropp\ServiceProvider::class,
    //...
];

Then publish the config file of the package using artisan.

php artisan vendor:publish --provider="Yaro\Cropp\ServiceProvider"

This package comes with Intervention Image package, so publish its configs too.

php artisan vendor:publish --provider="Intervention\Image\ImageServiceProviderLaravel5"

There is no need to add Intervention Image service provider in 'providers' array.

Usage

Simple wrap ypur image source on cropp function and call api methods.

<img src="{{ cropp('image.jpg')->invert()->fit(320, 200) }}" />
// <img src="http://example.com/storage/cropp/61bb83eae21cb5559fe0c583f14b0374.jpg">

Or not to wrap result on asset:

<img src="{{ cropp('image.jpg', false)->greyscale()->rotate(-45)->resize(500, null) }}" />
// <img src="https://raw.githubusercontent.com/Cherry-Pie/Cropp/HEAD/storage/cropp/44aead54d338966bca06535d34edc3ae.jpg">

To get generated source path use src method:

$thumbPath = cropp('image.jpg')->invert()->fit(320, 200)->src();

You can also initialise Cropp without helper function:

use Yaro\Cropp\Cropp;

$cropp = new Cropp('image.jpg', false);
$src = $cropp->fit(320, 200)->src(); 
echo $src; // /storage/cropp/44aead54d338966bca06535d34edc3ae.jpg
// or
$src = Cropp::make('image.jpg')->fit(320, 200)->src();
echo $src; // http://example.com/storage/cropp/61bb83eae21cb5559fe0c583f14b0374.jpg

API

All manipulation methods is provided by Intervention Image package.

License

The MIT License (MIT). Please see LICENSE for more information.

Related Packages

bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

545,042 510
creolab/image

Manipulate images, create thumbs, crop...

663 9
spatie/image

Manipulate images with an expressive API

77,626,191 1,366
laravel-at/laravel-image-sanitize

A small but handy package to prevent malicious code execution coming into your a...

94,580 345
jasis/image-resizer

Image resizer library for laravel

36 0

Version History

Version Released License
0.1.1 MIT
0.1.0 MIT
0.0.1 MIT