Imagysey
Setup
Run php artisan apysey:generate
in order to generate a random string key in the .env file. Like the following (for example) :
Imagysey uses this key in order to protect the associated route. To prevent a malicious person from spaming image generation.
Configuration
Now, go to config/imagysey.php. Here, you can change the default configuration.
Setting | Description | Default |
route |
| |
key |
| |
disks |
| |
dynamicSize | If you want Apysey can resize images in order to serve an optimized image. This value need to be true. |
|
middleware |
| |
namespace |
| |
templates |
| |
lifetime |
|
How to use?
Now, you can use Imagysey in your website. Like this :
If you want Imagysey to resize the image. We need to put the value true
in the dynamicSize
variable (in the configuration file). The first parameter is a string, in the example a variable to the image name.
Last updated