IMPORTANT: This version of Sitefinity CMS is out of support and the respective product documentation is no longer maintained and can be outdated. Use the version selector to view a supported product version.
You can programmatically retrieve the media URL or the thumbnail URL of an image using the image ID.
You use the following code to retrieve the media URL of an image. The ID argument is assigned to the master version of the image.
In the code above, you first get an instance of the libraries manager. Next, you get the specified image by its master ID. If the image is found, the ResolveMediaUrl method of the image item is called and returns the media URL of the image.
Back To Top
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important