Image
URL
image.url Get URL for resized image.
Parameters
- width: Image width. Set width and leave height blank to keep the orinal aspect ratio.
- height: Image height. Set height and leave width blank to keep the orinal aspect ratio.
- crop: true or false. Crop image if given dimensions deviate from original aspect ratio. Default: false.
Examples
{{ image.url }}               {# returns the unresized image URL #}
{{ image.url({width: 100}) }} {# returns resized image URL #}
Note: It is not guaranteed to get back the resized image. If it is not ready yet, the source URL will be returned.
HTML
image.html Get HTML image tag for resized image.
Parameters
- width: Image width. Set width and leave height blank to keep the orinal aspect ratio.
- height: Image height. Set height and leave width blank to keep the orinal aspect ratio.
- crop: true or false. Crop image if given dimensions deviate from original aspect ratio. Default: false.
- id: Set image tag idattribute.
- class: Set image tag classattribute.
- style: Set image tag styleattribute.
- alt: Set image tag altattribute.
- title: Set image tag titleattribute.
Examples
{{ image.html }}                       {# returns the unresized image tag #}
{{ image.html({width: 100}) }}         {# returns resized image tag #}
{{ image.html({title: "The Spark"}) }} {# returns image tag with custom title #}
Note: It is not guaranteed to get back the resized image. If it is not ready yet, the source URL will be returned.