$page->image()
Returns a specific image by filename or the first one
Parameters
Name | Type | Default |
---|---|---|
$filename | string |null |
null |
Return type
Kirby\Cms\File
|null
Parent class
Example
Fetching the first image
Fetching a specific image
What is an image file?
Kirby considers the following file types as images:
- jpeg
- jpg
- jpe
- gif
- png
- svg
- ico
- tif
- tiff
- bmp
- psd
- ai
- eps
- ps
- webp