Retrieve image and image thumbnail URL

You can programmatically retrieve the media URL or the thumbnail URL of an image using the image ID.

Retrieve media URL

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.

Retrieve thumbnail URL

To retrieve image thumbnail URLs you must use the ResolveThumbnailUrl extension method of the Telerik.Sitefinity.Modules.Libraries namesapce. For more information about the method usage refer to the Retrieve media content thumbnail URLs article.

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.

Web Security for Sitefinity Administrators

This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?