Skip to content

Kirby 5.0.4

$file->bw()

Converts the image to black and white

$file->bw(): Kirby\Cms\FileVersion|Kirby\Cms\File|Kirby\Filesystem\Asset

Return types

Kirby\Cms\FileVersionorKirby\Cms\FileorKirby\Filesystem\Asset

This method modifies the existing $file object it is applied to and returns it again.

Parent class

Kirby\Cms\File

Examples

if ($image = $page->image()) {
    echo $image->bw()->html();
}