Skip to content

Kirby 5.0.4

$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 types

stringornull

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

Parent class

Kirby\Cms\File