$file->niceSize()

Returns the size of the file in a human readable format

  • return (string)

Example

echo $page->file('my-image.jpg')->niceSize();
// i.e. 1.2 mb