Image, Audio, and Video Blocks
Image Block
Single Image
{
"id": "gl8xLjZf7", // Block ID
"type": "embed", // Block type
"embedType": "image", // Embed type
"embedData": { // Embed data
"src": "boAZK9u8c3poIC1kn4TijMUOEmjIQ6o0QAJf3IrXgSE.jpeg", // Resource file name (hash + ext)
"widthPercent": 46.65, // Image width as a percentage of Block width
"afb49d094056f33d5c3709bcd0af883e_width": 474, // Original image width (Key: md5 of src + '_width')
"afb49d094056f33d5c3709bcd0af883e_height": 296, // Original image height (Key: md5 of src + '_height')
"0_flex": 1 // Image width percentage in embed
},
"align": "left" // Alignment: "left" (default), "center", "right"
}
Multiple Images
{
"id": "KvrHRbZxY", // Block ID
"type": "embed", // Block type
"embedType": "image", // Embed type
"embedData": { // Embed data
// Multiple image src separated by '|'
"src": "dqSfbv69Fv2uU3qvBTGW-FSTRp1I93klay1HfFNYAtM.jpeg|boAZK9u8c3poIC1kn4TijMUOEmjIQ6o0QAJf3IrXgSE.jpeg|bfH2bCUP3OY3UOJt0XBm8KtGfav9euGPAx7R-dYgpjo.jpeg",
"widthPercent": 100,
"b9c0f762379c1f711cc0b075eb7b82b9_width": 474, // Original image width (Key: md5 of src + '_width')
"b9c0f762379c1f711cc0b075eb7b82b9_height": 296, // Original image height (Key: md5 of src + '_height')
"afb49d094056f33d5c3709bcd0af883e_width": 474, // Original image width (Key: md5 of src + '_width')
"afb49d094056f33d5c3709bcd0af883e_height": 296, // Original image height (Key: md5 of src + '_height')
"73d86633e4f902c08f63ed39e39d69ec_width": 800, // Original image width (Key: md5 of src + '_width')
"73d86633e4f902c08f63ed39e39d69ec_height": 800, // Original image height (Key: md5 of src + '_height')
"0_flex": 0.38, // First image width percentage in embed
"1_flex": 0.38, // Second image width percentage in embed
"2_flex": 0.24 // Third image width percentage in embed
}
}
Audio Block
{
"id": "jDKCPULmo", // Block ID
"type": "embed", // Block type
"embedType": "audio", // Embed type
"embedData": { // Embed data
"src": "aac-JANO6l-t2q7ib5F2hmvE1NzpvGYtk0AO16qXVHw.mp3", // Resource file name (hash + ext)
"fileName": "1712131203933.mp3", // Original file name
"fileSize": 20002, // File size
"fileType": "audio/mpeg" // File type
}
}
Video Block
{
"id": "v4oAtj_E2", // Block ID
"type": "embed", // Block type
"embedType": "video", // Embed type
"embedData": { // Embed data
"src": "0FArp4JJQOkEJIR81glMhYurd4cD44Kg-7cdtTPkrTA.mp4", // Resource file name (hash + ext)
"fileName": "rabbit320.mp4", // Original file name
"fileSize": 834563, // File size
"fileType": "video/mp4" // File type
},
"align": "left"
}
Examples
Code
{
"blocks": [
{
"id": "t3YSQcqC3",
"type": "text",
"text": [
{
"insert": "Image, Audio & Video Demo"
}
],
"heading": 1,
"quoted": false
},
{
"id": "gl8xLjZf7",
"type": "embed",
"embedType": "image",
"align": "left",
"embedData": {
"src": "boAZK9u8c3poIC1kn4TijMUOEmjIQ6o0QAJf3IrXgSE.jpeg",
"widthPercent": 46.65,
"afb49d094056f33d5c3709bcd0af883e_width": 474,
"afb49d094056f33d5c3709bcd0af883e_height": 296,
"0_flex": 1
}
},
{
"id": "KvrHRbZxY",
"type": "embed",
"embedType": "image",
"align": "left",
"embedData": {
"src": "dqSfbv69Fv2uU3qvBTGW-FSTRp1I93klay1HfFNYAtM.jpeg|boAZK9u8c3poIC1kn4TijMUOEmjIQ6o0QAJf3IrXgSE.jpeg|bfH2bCUP3OY3UOJt0XBm8KtGfav9euGPAx7R-dYgpjo.jpeg",
"widthPercent": 100,
"b9c0f762379c1f711cc0b075eb7b82b9_width": 474,
"b9c0f762379c1f711cc0b075eb7b82b9_height": 296,
"afb49d094056f33d5c3709bcd0af883e_width": 474,
"afb49d094056f33d5c3709bcd0af883e_height": 296,
"73d86633e4f902c08f63ed39e39d69ec_width": 800,
"73d86633e4f902c08f63ed39e39d69ec_height": 800,
"0_flex": 0.38,
"1_flex": 0.38,
"2_flex": 0.24
}
},
{
"id": "jDKCPULmo",
"type": "embed",
"embedType": "audio",
"embedData": {
"src": "aac-JANO6l-t2q7ib5F2hmvE1NzpvGYtk0AO16qXVHw.mp3",
"fileName": "1712131203933.mp3",
"fileSize": 20002,
"fileType": "audio/mpeg"
}
},
{
"id": "v4oAtj_E2",
"type": "embed",
"embedType": "video",
"embedData": {
"src": "0FArp4JJQOkEJIR81glMhYurd4cD44Kg-7cdtTPkrTA.mp4",
"fileName": "rabbit320.mp4",
"fileSize": 834563,
"fileType": "video/mp4"
},
"align": "left"
},
{
"id": "xkq2oPgh3",
"type": "text",
"text": []
}
]
}