☁️ Loving our new documentation website? Provide feedback in the CloudCannon Community! ✨

image_size_attributes

Table of contents

Description:

This key toggles whether CloudCannon will instruct a rich text editor to save width and height attributes on image elements.

Setting this key to true will instruct the rich text editor to save width and height attributes on image elements. This can prevent pop-in as a page loads.

By default, this key is false (i.e., width and height attributes are not saved on image elements). This defaults to true if the Image Size Attributes site flag is enabled (this is enabled for sites created before June 23 2023, in order to keep those sites working).

Appears in:
├── _inputs
│   └── *
│       ├── Rich Text Input
│       │   └── options
│       │       └── image_size_attributes
│       ├── File Input
│       │   └── options
│       │       └── image_size_attributes
│       └── URL Input
│           └── options
│               └── image_size_attributes
└── _editables
    ├── content
    │   └── image_size_attributes
    ├── block
    │   └── image_size_attributes
    └── image
        └── image_size_attributes
Type:
boolean
Default value:
true
Examples:

In this example, CloudCannon will save width and height attributes on image elements in a Rich Text Input.

Copied to clipboard
_inputs:
  content:
    type: markdown
    options:
      image_size_attributes: true
{
  "_inputs": {
    "content": {
      "type": "markdown",
      "options": {
        "image_size_attributes": true
      }
    }
  }
}
Open in a new tab