Skip to main content
Native image conversions work on Laravel disks without Spatie. Each named conversion is generated from the same stored original. For Spatie uploads, define conversions on your model instead; see the Spatie guide.

Original with thumbnail and large image

The bundle contains original, variants and the matching intents. Retain the bundle’s owned receipts in your application if you need to manage all its files later. FLEX upload fields manage their own receipts automatically.

Use a variant URL

variant() throws for an unknown name. url() may return null if private signing is unavailable.

Resize without cropping

Omit height to retain the aspect ratio. With both dimensions, Contain fits the image inside the bounds.

Square crop

Crop around a focus point

Focus coordinates range from 0 to 1; 0.5, 0.5 is the center.

Pad with a background

Stretch to exact dimensions

Stretch can distort the source. Use it only when your design requires it.

Output formats

An unavailable codec causes an explicit failure. There is no automatic format substitution. PNG remains lossless; its quality option controls compression rather than visual loss.

Separate derivative disk

Disk and directory otherwise inherit the original’s storage location and write directory.

Orientation, transparency and upscaling

By default, small images are not enlarged. JPEG flattens transparency onto the background. EXIF auto-orientation requires the EXIF extension.

Animated input

This explicitly permits flattening animation to one frame. The native encoder does not preserve animation. GIF and AVIF inputs conservatively require this option; animated PNG/WebP are detected. Native conversions do not render SVG, PDF or video.

Resource limits

Defaults: 16 million source pixels, 16 million output pixels, 16 variants and 256 MiB working memory. Available PHP memory may impose a lower limit. Dimensions must be positive and at most 32,768 per side. Non-contain fits require both dimensions. Conversion names are unique lowercase identifiers; original is reserved. The default encoder uses GD. Re-encoding removes EXIF and does not preserve ICC profiles. For color-managed workflows, bind your own ImageEncoder implementation; see extensions.

Background conversions

Use a worker when image generation should not delay a form’s permanent save. The original is stored and remains the stable attachment reference.
Run the configured worker:

Read processing status

These states describe conversion work, not browser transfer progress.

Prepare before a record is saved

When your application already owns a stored original but needs to delay dispatch until the model is saved:
The service dispatches after the record connection commits. Your custom save flow must prove its reference before dispatch. FLEX fields perform this integration automatically.

Retry failed conversions

Completed variants are preserved. Cancelled or already-ready plans are not revived. Invoke this through an authorized server action.

Cancel background conversions

Cancellation prevents further work and removes the plan’s owned derivatives. It deliberately retains the original until your storage lifecycle deletes it. Use your server-owned plan identity and receipt, never arbitrary client-supplied deletion data. Queue jobs use durable checkpoints and locks to make retries safe. Use shared private journals, disks, encryption keys and locks across web/worker hosts. Worker configuration. Inspect the selected native queue configuration with php artisan fff:media:doctor --queued --connection=database --timeout=60, replacing those values with your actual conversion options. This does not run a worker or perform a conversion. See Media OS diagnostics.

Delete a synchronous bundle

A synchronous conversion failure attempts to remove the whole newly created bundle. A successful bundle can be removed through this same ownership-aware API.

Original retention

The native engine keeps the original plus all named variants. optimizeImages() in FLEX Upload also retains the original. In synchronous optimization, the form may use the optimized path as its primary value; in queued mode the original path remains the model value. Neither behavior deletes the original. Spatie also preserves its stored original when generating conversions. Its preservingOriginal() option controls copying versus moving the input source file, not deletion of the library’s stored original. Spatie optimization acts on conversions. For a smaller master plus thumb, process the source before storing it as the master. Do not manually remove an original behind an active receipt/media record: original download, missing-preview fallback, verification and conversion regeneration depend on it.

Conversion options reference

For field-level usage, see FLEX image processing.
Last modified on October 20, 2026