$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|nullReturn types
stringornull
This method modifies the existing $file object it is applied to and returns it again.