Skip to content

5-Minute Quickstart

This quickstart uses the Aegean Voyages (aegeanvoyages.example) yacht gallery examples from site/modules/InterventionImage/examples/real-world/.

  1. Render a responsive LCP hero <picture> in your yacht template:

    <?php namespace ProcessWire;
    $hero = $page->getUnformatted('images')->first();
    if ($hero instanceof Pageimage) {
    echo $hero->render('landscape', [
    'loading' => 'eager',
    'isFirst' => true,
    'class' => 'yacht-hero__img',
    ]);
    }
  2. Generate a specific WebP variation with focal-point cropping and sharpening:

    $card = $hero->size(800, 520, [
    'format' => 'webp',
    'quality' => 84,
    'sharpening' => 'medium',
    ]);
    echo $card->url;
  3. Extract cached color tokens and perceptual fingerprint:

    $dominantHex = $hero->dominantColor(true); // '#1e293b'
    $theme = $hero->colorTheme(true); // ['vibrant' => ..., 'darkMuted' => ...]
    $dhash = $hero->imageHash('dhash'); // 16-char hex fingerprint
  4. Process any queued variations via CLI:

    Terminal window
    php vendor/bin/wire image:queue --status --json
    php vendor/bin/wire image:queue --limit=50 --json

Next steps