composer require darksandr/orchid-images
$images = \Orchid\Attachment\Models\Attachment::find(1);
\DarKsandr\Images\Image::make($images);
\DarKsandr\Images\Image::resize('custom_name')->save($images);
Name | Description |
---|---|
default | Default Image Resize Name |
component | Component Image Name |
format | Format Image Output (Supported format: "JPEG", "PNG", "GIF", "TIF", "BMP", "ICO", "PSD", "WebP") |
resizes | Resizes List |
/*
|--------------------------------------------------------------------------
| Resizes
|----
5CA2
----------------------------------------------------------------------
|
| If empty width and height - no resize
|
*/
'resizes' => [
'custom_name' => [
['width' => 800, 'height' => null, 'name' => 'pc', 'media' => 'max-width: 799px'],
['width' => 300, 'height' => null, 'name' => 'mobile', 'media' => 'min-width: 800px'],
],
],