$asset
Anything in your public path can be converted to an Asset object to use the same handy file methods and thumbnail generation as for any other Kirby files. Pass a relative path to the Asset object to create the asset.
-
new Asset()
-
$asset->alt()
-
$asset->asset()
-
$asset->blur()
-
$asset->bw()
-
$asset->clone()
-
$asset->crop()
-
$asset->exists()
-
$asset->extension()
-
$asset->grayscale()
-
$asset->greyscale()
-
$asset->hardcopy()
-
$asset->html()
-
$asset->id()
-
$asset->isResizable()
-
$asset->isViewable()
-
$asset->kirby()
-
$asset->mediaHash()
-
$asset->mediaPath()
-
$asset->mediaRoot()
-
$asset->mediaUrl()
-
$asset->modified()
-
$asset->path()
-
$asset->quality()
-
$asset->resize()
-
$asset->root()
-
$asset->srcset()
-
$asset->thumb()
-
$asset->toArray()
-
$asset->type()
-
$asset->url()
Details
You can create a new Asset object via the asset()
helper or via the class constructor:
Via the helper
Via the constructor
With the object defined, you can then start calling the class's methods: