Skip to documentation content

Image Preset

Image Preset

The image_preset object and methods for image presets.

{{ image_preset }}

Properties
Properties of {{ image_preset }} objects
Name Type Description
object_type string Will always be image_preset
is_valid boolean True if this references a published image_preset
guid string The unique identifier for this image_preset
value string Contains the same value as guid
code string The unique code for this image preset
query_string string The settings for this image preset represented as a query string
extension string The extension that filenames should end with for images that use this image preset, if it may be used to change the image format
settings {{ dictionary }} Contains all of the settings that this image preset will apply to images when used
field_id string The identifier for this field
label string The label for this field
output string The default output that the image_preset produces when output directly to the template, which is currently the preset code. The default output may change at any time. Template developers should avoid using this and should handle the output of image presets themselves

{% image_preset %}

{% image_preset output_to_template? [[var, set, or assign]? variable]? output_to_template? = value %}
Parameters
output_to_template optionalflag
If included the {% image_preset %} will be output directly to the template.
var, set, or assign optionalkeyword
Optional. Specify either "var", "set" or "assign" to change which scope this {% image_preset %} is stored on. "var" is the default behavior.
variable_name optionalvariable
Specify a variable name in order to save this image_preset to a variable. If not specified, it will be output to the template instead.
value requiredexpression
Should evaluate to an object of type image_preset, or the name or guid of one. May use liquid filters.

Fetches a single {{ image_preset }}.