Download the PHP package shawnsandy/img-fly without Composer
On this page you can find all versions of the php package shawnsandy/img-fly. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download shawnsandy/img-fly
More information about shawnsandy/img-fly
Files in shawnsandy/img-fly
Package img-fly
Short Description Dynamically resize images on the Fly
License MIT
Informations about the package img-fly
Laravel ImgFly
Dynamically resize images on the Fly in your Laravel App using the Glide library from thephpleague.
Glide is a wonderfully easy on-demand image manipulation library written in PHP. Its straightforward API is exposed via HTTP, similar to cloud image processing services like Imgix and Cloudinary. Glide leverages powerful libraries like Intervention Image (for image handling and manipulation) and Flysystem (for file system abstraction).
- Adjust, resize and add effects to images using a simple HTTP based API.
- Manipulated images are automatically cached and served with far-future expires headers.
- Create your own image processing server or integrate Glide directly into your app.
- Supports both the GD library and the Imagick PHP extension.
- Supports many response methods, including PSR-7, HttpFoundation and more.
- Ability to secure image URLs using HTTP signatures.
- Works with many different file systems, thanks to the Flysystem library.
- Powered by the battle tested Intervention Image image handling and manipulation library.
- Framework-agnostic, will work with any project.
- Composer ready and PSR-2 compliant.
- Get more info - glide.thephpleague.com
Install Glide Laravel
Via composer repository
-
Installs using composer repositories add the following to your
composer.json
file - Run the composer require to install the package
In Laravel 5.5 and higher the package automatically installs itself. If you are running Laravel 5.4 or earlier please follow the instructions below.
-
Add the provider to your
config\app.php
providers. - Add the facade to your
config\app.php
alias.
Routes
- Add the route to your
routes\web.php
Dependencies (required)
- Install the php league Laravel glide package Info and Instructions
Usage
-
Display and resize an image from your Storage folder
storage/app/images
directoryw=500
sets the image width to500
. - Display and resize an image from your
public/img
directoryw=500
sets the image width parameter to500
. Read more on setting additional parameters (height, crop, orientation) Glide quick reference.
Presets
You can also use preset to dynamically resize image on the fly. Parameters are set in the config app/imgfly.php
-
Publish the config file
-
Open and modify the presets
- Call the facade
Imgfly::imgPreset(image, preset_key = small, callBackMethod = 'img/imgPublic')
Testing
Contributing
Please see CONDUCT for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- [Shawn Sandy][link-author]
TODO
- Add image upload ui
- Add unit test