Image size attributes default behaviour#
image_size_attributes
is a configuration option that can be set for the Content Editor and Editable Regions, using the configuration cascade. When image_size_attributes
is true
, CloudCannon will inject width
and height
attributes onto images that are added to rich text through the editor.
See this article for more information about why you might want CloudCannon to add these attributes to your images. One noteable disadvantage of this behaviour is that, depending on the Markdown engine used by your site, Markdown-formatted images may need to be converted to HTML.
This flag sets the default behaviour, when image_size_attributes
is not explicitly configured. If this flag is turned on, any image input that does not explicitly have image_size_attributes
configured will inject the attributes. In most cases, this flag will be turned off, meaning that the attributes will not be injected for any editing interface that does not have image_size_attributes: true
.
If you are considering turning this flag on, we would recommend using the image_size_attributes
in your configuration instead. This flag will be turned on for some sites to maintain the legacy behaviour where these attributes were always added to rich text images by default.
Legacy Collections Value Key#
When you use a select input to reference a collection item, the value saved in your front matter is determined by options.value_key configured for your input. If this option has not been configured, the value will fallback to look for one of several sensible keys to pull from, like "id" and "title".
This flag exists to provide legacy behaviour to sites created before 25 November 2021. If turned on, select inputs that reference collection items, and which do not have options.value_key
configured, will save a combination of the collection item's path, slug and id.
It is not recommended to turn this flag on. Instead, configure options.value_key
for any select inputs that reference collections on your site.