darksandr/orchid-images

1.0.0 2023-08-30 06:49 UTC

This package is auto-updated.

Last update: 2024-09-30 01:35:59 UTC


README

composer require darksandr/orchid-images

Example use

Default

$images = \Orchid\Attachment\Models\Attachment::find(1);
\DarKsandr\Images\Image::make($images);

Custom resize name

\DarKsandr\Images\Image::resize('custom_name')->save($images);

Config

Example resize

/*
 |--------------------------------------------------------------------------
 | Resizes
 |--------------------------------------------------------------------------
 |
 | 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'],
    ],
],