mscharl / laravel-static-image-cache
store/cache external images as a static file
Installs: 2 813
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 1
Open Issues: 0
Requires
- php: >=7.0
- guzzlehttp/guzzle: ^6.0.0
- illuminate/console: ^5.0
- illuminate/filesystem: ^5.0
- illuminate/http: ^5.0
- illuminate/routing: ^5.0
- illuminate/support: ^5.0
This package is not auto-updated.
Last update: 2020-01-16 23:27:26 UTC
README
store/cache external images as a static file
Setup
Add the service provider to the app.php
provider array
[ MScharl\LaravelStaticImageCache\Provider\LaravelStaticImageCacheProvider::class, ]
Usage
Just use the staticImage
-helper to generate the static file url
<img src="{{ staticImage('https://images.domain.com/my-image.jpg') }}" alt="An external image">
Clear the files
To clear all the files manually you can use an artisan task.
php artisan static-image-cache:clear