2017 © Pedro Peláez
 

library imageresize

A simple, yet efficient solution for image resizing and caching with Laravel

image

nickdekruijk/imageresize

A simple, yet efficient solution for image resizing and caching with Laravel

  • Wednesday, July 11, 2018
  • by nickdekruijk
  • Repository
  • 1 Watchers
  • 1 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • -56 % Grown

The README.md

Latest Stable Version Latest Unstable Version Monthly Downloads Total Downloads License, (*1)

ImageResize for Laravel

A simple, yet efficient solution for image resizing and caching with Laravel. Based on my previous imageresize package, now renamed to nickdekruijk/imageresize-legacy., (*2)

Installation

To install the package use, (*3)

composer require nickdekruijk/imageresize, (*4)

Configuration

After installing for the first time publish the config file with, (*5)

php artisan vendor:publish --tag=config --provider="NickDeKruijk\ImageResize\ServiceProvider", (*6)

A default config file called imageresize.php will be available in your Laravel /config folder. See this file for more details., (*7)

How does it work

Let's assume you have an image in /public/media/images/test.jpg and a template called thumbnail. And have set the imageresize.route config to media/resized., (*8)

Referring to http://domain.com/media/resized/thumbnail/images/test.jpg will trigger the imageresize route in laravel since the file doesn't exist. Imageresize then creates the resized image and saves it as /public/media/resized/thumbnail/images/test.jpg., (*9)

So the next time you refer to http://domain.com/media/resized/thumbnail/images/test.jpg the file does exist and the image is served without triggering any php/laravel code for optimal performance., (*10)

Drawbacks

There is however one disadvantage: if the original image is edited or removed the resized file will still remain the same since referring to it doesn't trigger the imageresize package. You will have to manually delete it or use the php artisan imageresize:delete command to delete all resized images from the media/resized folder., (*11)

The Versions

11/07 2018

dev-master

9999999-dev http://www.nickdekruijk.nl/packages/imageresize

A simple, yet efficient solution for image resizing and caching with Laravel

  Sources   Download

MIT

The Requires

 

by Nick de Kruijk

laravel cache php image resize

11/07 2018

1.0.0

1.0.0.0 http://www.nickdekruijk.nl/packages/imageresize

A simple, yet efficient solution for image resizing and caching with Laravel

  Sources   Download

MIT

The Requires

 

by Nick de Kruijk

laravel cache php image resize

02/04 2018

1.0

1.0.0.0

  Sources   Download

03/03 2017

1.0.2

1.0.2.0

A simple, yet efficient solution for image resizing and caching with php and htaccess.

  Sources   Download

MIT

by Nick de Kruijk

php image resize

17/02 2017

1.0.1

1.0.1.0

A simple, yet efficient solution for image resizing and caching with php and htaccess.

  Sources   Download

MIT

by Nick de Kruijk

php image resize