Skip to content

Kirby 5.0.4

$qrCode->write()

Saves the QR code to a file. Supported formats: gif, jpg, jpeg, png, svg, webp

$qrCode->write(string $file, int|string|null $size = null, string $color = '#000000', string $back = '#ffffff', int $border = 4): void

Parameters

Name Type Default Description
$filerequired string no default value Path to the output file with one of the supported file extensions
$size intorstringornull null Optional image width/height in pixels (defaults to a size per module of 4x4) or CSS width of the <svg> element
$color string '#000000' Foreground color in hex format
$back string '#ffffff' Background color in hex format
$border int 4 Border size in number of modules

Parent class

Kirby\Image\QrCode