Reference

Guide

File versions

Adapt file characteristics

/site/plugins/file-urls/index.php
Kirby::plugin('my/fileVersions', [
  'components' => [
    'file::version' => function (Kirby $kirby, FileModifications $file, array $options = []) {
      // …
      return new FileVersion([
        // …
      ]);
    }
  ]
]);

Parameters

Name Type Default Description
$kirby Kirby\Cms\App

Kirby instance

$file Kirby\Cms\File|Kirby\Cms\FileModifications

The file object

$options array [ ]

All thumb options (width, height, crop, blur, grayscale)

Return type

Kirby\Cms\File|Kirby\Cms\FileVersion

Source code

kirby/config/components.php#L73