dev-master
9999999-devSmall image caching repository
MIT
The Requires
The Development Requires
by Sam Joyce
Small image caching 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)
$ 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
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);
Small image caching repository
MIT