Skip to content

Kirby 4.8.0

$file->previewUrl()

Clean file URL that uses the parent page URL and the filename as a more stable alternative for the media URLs if available. The content.fileRedirects option is used to disable this behavior or enable it on a per-file basis.

$file->previewUrl(): string|null

Return type

string|null

Parent class

Kirby\Cms\File