Share via


extensionCommonIcon object

Specifies properties of the image file used to represent the add-in.

Properties that reference this object type:

Properties that reference this object type:

Properties that reference this object type:

Syntax

{
  "size": {number},
  "url": "{string}"
}

Properties

size

Specifies the size of the icon in pixels, enumerated as 16,20,24,32,40,48,64,80.

Type
number

Required

Constraints

Supported values
Allowed values: 16, 20, 24, 32, 40, 48, 64, 80.

url

Specifies the full, absolute URL of the image file that is used to represent the add-in.

This property is localizable. For more information, see the localization schema.

Type
string

Required

Constraints
Maximum string length: 2048.

Supported values
The string must start with https://.

Remarks

The ICO file format isn't supported. Using it in your manifest will fail manifest validation and prevent your Office Add-in from appearing in the ribbon or action bar.

When specifying the extensions.alternates.alternateIcons.highResolutionIcon or extensions.alternates.alternateIcons.icon properties, the extensionCommonIcon type works differently from how it works in other contexts, as noted in the following points:

  • The icon file must be one of the following file formats: GIF, JPG, PNG, EXIF, BMP, TIFF.
  • The size property is ignored, but it must be present and have a valid size value. When the manifest is validated, the size of the file in the url property is measured.
  • For the alternateIcons.icon property, the file that icon.url points to must be 64 x 64 pixels if mail is in the extensions.requirements.scopes array (or there is no extensions.requirements.scopes property in the manifest). Otherwise, it must be 32 x 32 pixels.
  • For the alternateIcons.highResolutionIcon property, the file that highResolutionIcon.url points to must be 128 x 128 pixels if mail is in the extensions.requirements.scopes array (or there is no extensions.requirements.scopes property in the manifest). Otherwise, it must be 64 x 64 pixels.

Examples

{
  "icons": [
    {
      "size": 16,
      "url": "test_16.png"
    },
    {
      "size": 32,
      "url": "test_32.png"
    },
    {
      "size": 80,
      "url": "test_80.png"
    }
  ]
}

In the following example, the size properties are ignored, but they must be present and have valid values. When the manifest is validated, the files are opened and measured.

{
    "alternateIcons": {
      "icon": {
        "size": 64,
        "url": "https://contoso.com/assets/icon64x64.jpg"
      },
      "highResolutionIcon": {
        "size": 64,
        "url": "https://contoso.com/assets/icon128x128.jpg"
      }
    }
}