Image (JPG, PNG, GIF, ICO) web resources
Applies To: CRM 2015 on-prem, CRM Online
Use image web resources to make images available for use in Microsoft Dynamics CRM.
Capabilities of image web resources
With image web resources you can add images where you need them. Common uses include the following:
Custom entity icons
Icons for custom Ribbon controls and SiteMap subareas
Decorative graphics for entity forms and webpage web resources.
Background images that are used by CSS web resources.
Limitations of image web resources
Like all web resources, image web resources use the Microsoft Dynamics CRM security context. Only licensed Microsoft Dynamics CRM users who have the necessary privileges can access them.
Only the four specified types of image files (*.jpg, *.png, *.gif, and *.ico) are supported.
Reference an image web resource from a webpage web resource
All web resources can use relative URLs to reference each other. In the following example, for the webpage (HTML) web resource new_/content/contentpage.htm to reference the image web resource new_/Images/image1.png, add the following HTML code to new_/content/contentpage.htm:
Reference an image web resource from a Microsoft Dynamics CRM form
Navigate to the form editor for an entity.
Select where you want to add the image in the form.
On the Insert tab, click Web Resource.
On the General tab, select the web resource image that you want to add.
Specify a name for the web resource. You can also specify a label and alternative text.
On the Formatting tab, you can define:
The number of columns the images should use.
The number of rows the images should use, or if it should automatically expand to use available space.
The size of the image using the following options:
- Stretch to fit
- Stretch to fit (maintain aspect ratio)
- Stretch to fit
If you select “Specific,” you can enter the desired height and width in pixels.
- The number of columns the images should use.
You must save your changes and publish the form before users can see the image in the form.
Reference an image web resource from a ribbon element or from the Site Map subarea
$webresource: directive to specify a web resource image to use as an icon in the ribbon or in the application navigation using Site Map. The following sample shows how to specify icons for a button in the ribbon.
<Button Id="MyISV.opportunity.form.actions.FlyoutAnchor.Button.1" Image16by16="$webresource:new_/icons/oneIcon16.png" Image32by32="$webresource:new_/icons/oneIcon32.png"/>
Microsoft Dynamics CRM 2015 and Microsoft Dynamics CRM Online
Send comments about this topic to Microsoft.
© 2014 Microsoft Corporation. All rights reserved.