Image
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
JSON 表示法 |
{
"url": string,
"accessibilityText": string,
"height": integer,
"width": integer
} |
字段 |
url |
string
图片的来源网址。图片可以是 JPG、PNG 和 GIF(动画和非动画)。例如:https://www.agentx.com/logo.png 。必填。
|
accessibilityText |
string
将用于无障碍功能的图片的文字说明,例如屏幕阅读器。必填。
|
height |
integer
图片的高度(以像素为单位)。可选。
|
width |
integer
图片的宽度(以像素为单位)。可选。
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eImages are represented using JSON with fields for URL, accessibility text, height, and width.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eurl\u003c/code\u003e field specifies the image source and supports JPG, PNG, and GIF formats.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eaccessibilityText\u003c/code\u003e provides a description for screen readers and is required for all images.\u003c/p\u003e\n"],["\u003cp\u003eOptional \u003ccode\u003eheight\u003c/code\u003e and \u003ccode\u003ewidth\u003c/code\u003e fields can be used to specify the image dimensions in pixels.\u003c/p\u003e\n"]]],["The provided content details the JSON representation of an image. It includes a `url` (string) specifying the image's source, which must be a JPG, PNG, or GIF. An `accessibilityText` (string) is required for screen readers. Optional fields include `height` and `width` (integers) to define the image dimensions in pixels. All fields are contained within a JSON object with the provided schema.\n"],null,["# Image\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n\nAn image displayed in the card.\n\n| JSON representation ||\n|---------------------------------------------------------------------------------------------|---|\n| ``` { \"url\": string, \"accessibilityText\": string, \"height\": integer, \"width\": integer } ``` |\n\n| Fields ||\n|---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `url` | `string` The source url of the image. Images can be JPG, PNG and GIF (animated and non-animated). For example,`https://www.agentx.com/logo.png`. Required. |\n| `accessibilityText` | `string` A text description of the image to be used for accessibility, e.g. screen readers. Required. |\n| `height` | `integer` The height of the image in pixels. Optional. |\n| `width` | `integer` The width of the image in pixels. Optional. |"]]