Field Types / Image field
Note: You are currently reading the documentation for Bolt 3.7. Looking for the documentation for Bolt 5.2 instead?
Simple image upload/select field.
Basic Configuration:¶
cover:
type: image
Example usage in templates:¶
{{ record.cover|showimage() }}
or
{{ record.cover|thumbnail() }}
or
{{ record.cover|popup() }}
See Bolt Template tags for more info.
Options:¶
The field has a few options to change the appearance and functionality of the field.
extensionsAllows you to restrict users to only be able to upload files with certain file extensions.attribCan be set to a custom attribute, such as alt-texts, titles, captions or data-attributes. For example:altShow a text field for thealtparametertitleShow a text field for thetitleparametercaptionShow a custom field for acaptionthat image will use in your template[alt, title, caption]Add more than one attribute
uploadAllows you to upload files for this field into a specified directory so they remain grouped. This directory will be created in{%web%}/files/
cover:
type: image
attrib: [alt, title, caption]
extensions: [ gif, jpg, png ]
upload: portfolio
You can call these in your templates by using {{ record.values.image.alt }}
or {{ record.values.image.caption }} and they will also be automatically used by
bolt's image functions.
Edit this page on GitHub
Couldn't find what you were looking for? We are happy to help you in the forum, on Slack or on Github.
Couldn't find what you were looking for? We are happy to help you in the forum, on Slack or on Github.