$file->uri()

Returns the cleaned up relative path for the file

  • since: Kirby 2.3.0
  • return (string)

Example:

echo $page->file()->uri();

Result:

projects/project-b/forrest.jpg

While $file->diruri() includes all the sorting numbers for each content folder, this method strips them all and returns a cleaned version of the path.