Configuration

Last updated: August 19th 2026
Super Images is configured primarily from:
config/super-images.php
Start from the commented example:
cp vendor/amici/craft-super-images/config/super-images.example.php config/super-images.php

The Control Panel Settings screen shows the effective values and lets you edit derivative naming when it is not locked by the PHP file.

Top-level keys
KeyPurpose
enabledMaster switch. false = no transforms; Twig falls back to original URLs
defaultProfile / defaultFormatUsed when Twig/CLI omit profile or format
driverauto | libvips | imagick | gd
deliveryBefore-page-load generation + thumbnail placeholder
autoGenerateQueue on Asset upload / replace / focal-point change
sourcesLocal path roots + remote host allow-list
runtimeSigned lazy-generate URL settings
storageAdapters, markers, naming templates
encodersNative encode quality / options
optimizersPost-encode binaries (jpegoptim, cwebp, …)
profilesNamed variant × format sets
volumes / folders / fieldsScoped overrides
cleanupPreview / generated retention
policiesEncode, geometry, safety, cleanup, fallback — see Policies

Profiles (the usual Twig surface)

'profiles' => [
    'responsive' => [
        'formats' => ['jpg', 'webp'],
        'variants' => [
            'sm' => ['width' => 576],
            'md' => ['width' => 768],
            'lg' => ['width' => 992],
            'xl' => ['width' => 1280],
        ],
        'defaults' => [
            'position' => 'center-center',
            'mode' => 'fit',
            'jpegQuality' => 80,
        ],
    ],
],
In Twig:
{{ craft.superImages.img(asset, { profile: 'responsive', variant: 'md', format: 'webp' }) }}

Pass operations only when you want a custom pipeline (it replaces the profile variant steps).


Sources

'sources' => [
    'local' => [
        'enabled' => true,
        'allowedRoots' => ['@webroot/images', '@webroot/uploads'],
    ],
    'remote' => [
        'enabled' => true,
        'allowedHosts' => ['cdn.example.com', '*.picsum.photos'],
        'timeout' => 10,
        'maxBytes' => 25_000_000,
        'maxRedirects' => 3,
    ],
],

Remote URLs are denied unless the host is allow-listed.

Delivery & runtime

'delivery' => [
    'generateBeforePageLoad' => true, // omit to mirror Craft’s general setting
    'thumbnail' => [
        'enabled' => true,
        'width' => 32,
        'format' => 'jpg',
        'quality' => 50,
        'variant' => 'thumb',
    ],
],

'runtime' => [
    'enabled' => true, // required when generateBeforePageLoad is false
    'signingSecret' => App::env('SUPER_IMAGES_SIGNING_SECRET'),
    'urlTtl' => 3600,
    'maxWidth' => 4096,
    'maxHeight' => 4096,
    'maxPixels' => 20_000_000,
],
ModeWhat Twig emits for missing files
generateBeforePageLoad = trueGenerate now → storage URL
generateBeforePageLoad = falseSigned runtime action URL (first hit generates)

Storage naming

Paths must change when operations/settings change, or you will see stale cached images.


Default:
'storage' => [
    'naming' => [
        'assetPath' => '{folderHash}/{transformHash}/{assetId}/{basename}-{variant}.{ext}',
        'path' => '{identityShard}/{basename}-{variant}.{ext}',
        'transformHashLength' => 16,
        'includeVolumeInFolderHash' => false,
    ],
],

Full token list and recipes: Storage.

Edit in CP → Super Images → Settings, or in PHP. If storage.naming exists in config/super-images.php, the file wins.

Environment variables

VariableUse
SUPER_IMAGES_SIGNING_SECRETRuntime URL HMAC (falls back to Craft securityKey)
SUPER_IMAGES_STORAGEDefault adapter handle
SUPER_IMAGES_S3_* / CDN URLRemote storage
JPEGOPTIM_PATH / CWEBP_PATH / …Optimizer binaries (see example config)

Inspect effective config

php craft super-images/config --asset=123
php craft super-images/status
php craft super-images/doctor