2017 © Pedro Peláez
 

laravel album

Small image caching repository

image

samjoyce777/album

Small image caching repository

  • Sunday, February 7, 2016
  • by samjoyce
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Laravel Image Cache Repository

This package simply uses a directory of your choosing, allows you to set the sizes of images and then resizes and saves them as a cache file in the public directory of your choosing. Mirrors the original folders directory structure and keeps filename but with the addition of the dimensions on the cache filename. Only makes the cache file on request so non-used images / sizes wont be cached., (*1)

Installation

$ composer install samjoyce777/album --save

Add the service provider to the config.php, (*2)

$ \samjoyce777\album\AlbumServiceProvider::class,

Add the facade as well to make it all pretty, (*3)

$ 'Album' => \samjoyce777\album\Facades\Album::class,

Move the config file to make your customizations, (*4)

$ php artisan vendor:publish --tag=config

Usage

This will return the cache image URL of the size you have requested listed in you config, (*5)

Album::getImage('cushion.jpg', 'medium');

This will get return the cache image URL of the nearest sized image from your configured sizes, it will always make sure it is the same or larger., (*6)

Album::getNearestImage('cushion.jpg', 200);

This is still in work in progress stage.

The Versions

07/02 2016

dev-master

9999999-dev

Small image caching repository

  Sources   Download

MIT

The Requires

 

The Development Requires