图像元素

提供用作图标的图像文件的 URL。

加载项类型: 任务窗格,“邮件”

仅在以下 VersionOverrides 架构中有效:

  • 任务窗格 1.0
  • 邮件 1.0
  • 邮件 1.1

有关详细信息,请参阅仅加载 项清单中的版本替代。

注意

必须对 Image> 元素中的所有 URL 和任何子 Override 元素中使用<安全套接字层 (SSL) 。><

每个图标必须具有三个 <图像> 元素,三个强制大小各一个:

  • 16x16
  • 32x32
  • 80x80

还支持以下其他大小,但不是必需的。

  • 20x20
  • 24x24
  • 40x40
  • 48x48
  • 64x64

支持以下图像文件格式。

  • BMP
  • EXIF
  • GIF
  • JPG
  • PNG
  • TIFF

重要

  • 如果图像是加载项的代表图标,请参阅在 AppSource 和 Office 中创建有效的列表 ,了解大小和其他要求。
  • Office 加载项需要能够缓存图像资源以实现性能目的。 为此,托管图像资源的服务器不能向响应头添加任何 CACHE-CONTROL 指令。 这些指令会导致 Office 自动替换常规或默认图像。 若要强制在开发计算机上使用新图标,请 清除 Office 缓存。 若要强制在最终用户的计算机上使用新图标,必须为新图标提供不同于旧图标的 URL。
  • 不支持 ICO 格式。 在清单中使用该加载项将使清单验证失败,并阻止加载项显示在功能区或操作栏中。

子元素

元素 类型 说明
Override image 提供根据指定区域设置覆盖 URL 的方法。

示例

<Resources>
      <bt:Images>
        <bt:Image id="icon1_16x16" DefaultValue="https://www.contoso.com/icon_default.png">
          <bt:Override Locale="ja-jp" Value="https://www.contoso.com/ja-jp16-icon_default.png" />
        </bt:Image>
        <bt:Image id="icon1_32x32" DefaultValue="https://www.contoso.com/icon_default.png">
          <bt:Override Locale="ja-jp" Value="https://www.contoso.com/ja-jp32-icon_default.png" />
        </bt:Image>
        <bt:Image id="icon1_80x80" DefaultValue="https://www.contoso.com/icon_default.png">
          <bt:Override Locale="ja-jp" Value="https://www.contoso.com/ja-jp80-icon_default.png" />
        </bt:Image>
      </bt:Images>
      <bt:Urls>
        <bt:Url id="residDesktopFuncUrl" DefaultValue="https://www.contoso.com/Pages/Home.aspx">
          <bt:Override Locale="ja-jp" Value="https://www.contoso.com/Pages/Home.aspx" />
        </bt:Url>
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="residLabel" DefaultValue="GetData">
          <bt:Override Locale="ja-jp" Value="JA-JP-GetData" />
        </bt:String>
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="residToolTip" DefaultValue="Get data for your document.">
          <bt:Override Locale="ja-jp" Value="JA-JP - Get data for your document." />
        </bt:String>
      </bt:LongStrings>
    </Resources>