npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

laravel-image

v1.0.3

Published

Javascript helpers for the Laravel image manipulation package

Downloads

47

Readme

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, flip and effects such as negative, grayscale, gamma, colorize and blur. You can also define custom filters for greater flexibility. This library works with the local filesystem and Laravel Filesystems (Amazon S3, etc...).

Latest Stable Version
Build Status
Coverage Status
Total Downloads

Introduction

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 Laravel for future requests (this behaviour can be disabled).

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, ['crop', 'grayscale']);

or

<img src="<?=Image::url('/uploads/photo.jpg', 300, 300, ['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', [
    '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

Based on Imagine

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

Multiple Sources

You can define multiple sources for your images. Both locally and in the cloud (via Laravel filesystems).

Filters

This package also provides some build-in filters ready to use (more on Filters):

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

Installation

Version Compatibility

| Laravel Image | Laravel | | :--- | :--- | | 0.1.* | 4.2.* | | 0.2.* | 5.0.* | | 0.3.* | >= 5.1.* | | 1.0.* | >= 5.1.* |

Dependencies:

Server Requirements:

Installation:

1- Require the package via Composer.

$ composer require folklore/image

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

Folklore\Image\ImageServiceProvider::class,

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

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

4- Publish the configuration file and public files

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

5- Review the configuration file at 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.

  • Artisan command to manipulate images
  • Support for batch operations on multiple files