- 3.6. Function reference
3.6.16. isImage() - 3.6.15. indent()
« Previous - 3.6.17. isUrl()
Next »
3.6.16. isImage()
| Reference | boolean isImage(string $text) |
|---|
Returns true, if the $text is a valid URL/path to the image file. The function checks it by the file extension. Currently recognized ones are:
- JPG
- PNG
- BMP
- GIF
- SVG
Sample use:
<!-- displays the IMG tag, if the `$text` contains a path to the image --> <img parse:src="$text" opt:if="isImage($text)" />
- 3.6.16. isImage()
3.6. Function reference - « Previous
3.6.15. indent() - Next »
3.6.17. isUrl()