# Use GetImageResource in a control add-in
Gets the URL for an image resource specified in the control add-in manifest. Business Central stores the resource in the database as part of the control add-in's `.zip` file. The method returns a URL that the control add-in script can use to retrieve the resource.
Learn more about control add-ins in Control add-in object<../devenv-control-addin-object>.
## Method signature
`string Microsoft.Dynamics.NAV.GetImageResource(resourceName)`
## Parameters
Parameter|Description
resourceName|Type: String<br /><br />The name of the image resource as declared in the control add-in manifest.
## Return value
Type: String
Returns a URL for the specified image resource.
## Example
The following example assigns the returned URL to an image element with the ID pushpinImage.
```javascript
var imageUrl = Microsoft.Dynamics.NAV.GetImageResource('PushpinImage.png');
document.getElementById('pushpinImage').src = imageUrl;
```
## Related information
AL method reference<../methods-auto/library>
devenv-getenvironment-method
devenv-invokeextensibility-method
devenv-openwindow-method

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods/devenv-getimageresource-method, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/methods/devenv-getimageresource-method/
