Jump to content

How to get an image url that is suitable to put in a <img src


Recommended Posts

HawkXP71
Posted

I am moving some code from JS that currently runs inside a js page.

The current code is

var serverId = "...."; // a valid server Id 
var imageid = "....."; // a valid image id
var imageUrl = ApiClient.getImageUrl( imageId, { type: "Primary", quality: 90 } )

return "<<a is="emby-linkbutton" href="/item?id=` + imageId + `&serverId=` + serverId + `"><img src="` + imageUrl + `" height="200px" alt="` + v.Name + `" /></a>`;

I am trying to get the same exact url from C# function calls.  I have access to all the globals created during the service construction.

Thanks in advance

Scott

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...