[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003e\u003ccode\u003eIconImage\u003c/code\u003e allows you to display a predefined or custom icon using a URL.\u003c/p\u003e\n"],["\u003cp\u003eYou can customize the icon's appearance with a specific crop style (SQUARE or CIRCLE).\u003c/p\u003e\n"],["\u003cp\u003eAlternative text can be set for accessibility purposes using \u003ccode\u003esetAltText()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003esetIcon()\u003c/code\u003e and \u003ccode\u003esetIconUrl()\u003c/code\u003e methods allow you to specify the icon source, either a predefined icon or a URL.\u003c/p\u003e\n"],["\u003cp\u003eAll methods return the \u003ccode\u003eIconImage\u003c/code\u003e object, enabling method chaining for streamlined configuration.\u003c/p\u003e\n"]]],["The `IconImage` object allows setting an icon using predefined options, a material design icon, or a URL. Key actions include: setting alternative text for accessibility (`setAltText`), choosing a predefined icon (`setIcon`), specifying an icon URL (`setIconUrl`), defining the image crop style (`setImageCropType`), and selecting a material design icon (`setMaterialIcon`). Each method returns the `IconImage` object for chaining additional actions.\n"],null,["IconImage\n\nA predefined icon, a material design icon, or an icon from a URL with a customizable crop style. \n\nMethods\n\n| Method | Return type | Brief description |\n|---------------------------------------------------------------------|----------------|-----------------------------------------------------------------------|\n| [setAltText(altText)](#setAltText(String)) | [IconImage](#) | Sets the alternative text of the URL which is used for accessibility. |\n| [setIcon(icon)](#setIcon(Icon)) | [IconImage](#) | Sets the predefined icon if the URL is not set. |\n| [setIconUrl(url)](#setIconUrl(String)) | [IconImage](#) | Sets the URL of the icon if the icon is not set. |\n| [setImageCropType(imageCropType)](#setImageCropType(ImageCropType)) | [IconImage](#) | Sets the crop style for the image. |\n| [setMaterialIcon(icon)](#setMaterialIcon(MaterialIcon)) | [IconImage](#) | Sets the material design icon. |\n\nDetailed documentation \n\n`set``Alt``Text(altText)` \nSets the alternative text of the URL which is used for accessibility.\n\nParameters\n\n| Name | Type | Description |\n|-------------|----------|-----------------------|\n| `alt``Text` | `String` | The alternative text. |\n\nReturn\n\n\n[IconImage](#) --- This object, for chaining.\n\n*** ** * ** ***\n\n`set``Icon(icon)` \nSets the predefined icon if the URL is not set. Default is NONE.\n\nParameters\n\n| Name | Type | Description |\n|--------|--------------------------------------------------|--------------------------------------------------------------------------------|\n| `icon` | [Icon](/apps-script/reference/card-service/icon) | One of the predefined [Icon](/apps-script/reference/card-service/icon) values. |\n\nReturn\n\n\n[IconImage](#) --- This object, for chaining.\n\n*** ** * ** ***\n\n`set``Icon``Url(url)` \nSets the URL of the icon if the icon is not set.\n\nParameters\n\n| Name | Type | Description |\n|-------|----------|------------------------------------------------------|\n| `url` | `String` | The URL address of a hosted image to use as an icon. |\n\nReturn\n\n\n[IconImage](#) --- This object, for chaining.\n\n*** ** * ** ***\n\n`set``Image``Crop``Type(imageCropType)` \nSets the crop style for the image. The crop type options you can use for icons are `SQUARE\n` and `CIRCLE`. Default is `SQUARE`.\n\nParameters\n\n| Name | Type | Description |\n|---------------------|----------------------------------------------------------------------|------------------------------------|\n| `image``Crop``Type` | [ImageCropType](/apps-script/reference/card-service/image-crop-type) | The ImageCropType option to apply. |\n\nReturn\n\n\n[IconImage](#) --- This object, for chaining.\n\n*** ** * ** ***\n\n`set``Material``Icon(icon)` \nSets the material design icon.\n\n```javascript\nconst iconImage = CardService.newIconImage().setMaterialIcon(\n CardService.newMaterialIcon().setName('search'),\n);\n```\n\nParameters\n\n| Name | Type | Description |\n|--------|-------------------------------------------------------------------|--------------------|\n| `icon` | [MaterialIcon](/apps-script/reference/card-service/material-icon) | The material icon. |\n\nReturn\n\n\n[IconImage](#) --- This object, for chaining."]]