57 lines
1.4 KiB
Plaintext
57 lines
1.4 KiB
Plaintext
{
|
|
// Corresponds to CF_ComponentImg / Contentful_Img.ts (Asset/Image)
|
|
name: "img",
|
|
description: "Image asset with URL, filename and optional dimensions",
|
|
tags: ["asset", "media"],
|
|
category: "components",
|
|
fields: {
|
|
title: {
|
|
type: "string",
|
|
required: true,
|
|
description: "Image title",
|
|
},
|
|
description: {
|
|
type: "string",
|
|
description: "Alt text / description",
|
|
},
|
|
file: {
|
|
type: "object",
|
|
required: true,
|
|
description: "File: url (required), fileName, contentType, details (size, image.width/height)",
|
|
fields: {
|
|
url: {
|
|
type: "string",
|
|
required: true,
|
|
description: "Image file URL",
|
|
},
|
|
fileName: {
|
|
type: "string",
|
|
description: "Filename",
|
|
},
|
|
contentType: {
|
|
type: "string",
|
|
description: "e.g. image/jpeg",
|
|
},
|
|
details: {
|
|
type: "object",
|
|
description: "Size and dimensions",
|
|
fields: {
|
|
size: {
|
|
type: "integer",
|
|
description: "File size in bytes",
|
|
},
|
|
image: {
|
|
type: "object",
|
|
description: "Image dimensions",
|
|
fields: {
|
|
width: { type: "integer", description: "Width in px" },
|
|
height: { type: "integer", description: "Height in px" },
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|