Tools

Image Manager

Read image metadata and perform transformations like resize, crop, convert, and optimize.

Introduction

The Image Manager tool inspects and transforms images stored on any allowed disk. It uses Spatie Image, which can run on either Imagick or GD.

After any transformation, the resulting image is automatically attached to the agent's reply.

Drivers

LARACLAW_IMAGE_DRIVER=imagick

Valid values are imagick (default) and gd. Imagick supports more formats and produces higher quality output, but requires the imagick PHP extension.

Inspecting an Image

The info operation returns the image's width, height, MIME type, and file size:

ParameterDescription
diskStorage disk
pathImage file path

Resizing and Cropping

OperationParametersNotes
resizedisk, path, width and/or heightAspect ratio is preserved when only one dimension is given
cropdisk, path, width, heightCrops to exact dimensions from the center

The output is saved alongside the source with a _resized or _cropped suffix, and attached to the reply.

Format Conversion

The convert operation changes the image format:

ParameterDescription
diskStorage disk
pathSource image path
formatTarget format: jpg, png, or webp

The converted file is saved next to the original with the new extension.

Optimization

The optimize operation re-saves the image at a chosen quality level to reduce file size:

ParameterDescription
diskStorage disk
pathSource image path
qualityInteger from 1 to 100

Rotating and Flipping

The orient operation rotates or flips the image:

ParameterDescription
diskStorage disk
pathSource image path
orientationOne of: rotate_90, rotate_180, rotate_270, flip_horizontal, flip_vertical

Returning Images in a Reply

Every write operation (resize, crop, orient, convert, optimize) automatically queues the resulting file for the connector to attach to the reply. The agent does not need a separate step.

Copyright © 2026