$asset
Anything in your public path can be converted to an Asset object to use the same handy file methods as for any other Kirby files. Pass a relative path to the class to create the asset.
-
$asset->asset()
-
$asset->blur()
-
$asset->bw()
-
$asset->clone()
-
$asset->crop()
-
$asset->exists()
-
$asset->grayscale()
-
$asset->greyscale()
-
$asset->hardcopy()
-
$asset->id()
-
$asset->kirby()
-
$asset->mediaHash()
-
$asset->mediaPath()
-
$asset->mediaRoot()
-
$asset->mediaUrl()
-
$asset->path()
-
$asset->quality()
-
$asset->resize()
-
$asset->root()
-
$asset->srcset()
-
$asset->thumb()
-
$asset->type()
-
$asset->url()
-
new Asset()
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: