Skip to content

Image variations #163

Open
Open
@paulocoutinhox

Description

Hi,

How to create image variations?

I need create original, thumb and mobile variations. But today i can work only with the original image:

'on afterSave' => function ($event) {
                    /* @var $file File */
                    $file = $event->file;
                    
                    $img = ImageManagerStatic::make($file->read())->resize(null, 600, function ($constraint) {
                        $constraint->aspectRatio();
                    });

                    $file->put($img->encode());
                }

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions