Generate a link to an image that starts with https

In a template used to display an image (and some other stuff) I can get the link to the image using this binding:
$link = $rx.location.generate($sys.assemblyItem, “hecBnImage”)

Checking the value of $link indicates the string starts with “http:…”
I would like to generate a link that starts with “https:…”
Any obvious solution I am overlooking ? Thanks.


The implication is that your Site Definition has “http://…” in the Published URL field, and that this location is being generated as a Cross Site Link. If your site is HTTPS all the time, change your Site Def. If your use case is specific to this template, just do a string replace.

$link = $rx.location.generate($sys.assemblyItem, “hecBnImage”);
$link = $link.replace(‘http://’,‘https://’);