No problem with your razor, it'll work just fine in a macro.
@{
var imgUrl = "http://image-generator.aspx?guid=1234"; // that url generates image
<img src="/ImageGen.ashx?image=@imgUrl" />
}
You'll need to use ImageGen Professional to make the remote request, though. And add the remote domain to the /config/imagegen.config file so that it is allowed (by default ImageGen doesn't allow remote requests to protect your server from being abused as a resizing engine for everyone on the internet).
See the docs for further info about using remote domains.
Use querystring-url as image param
Hi guys.
Is that possible do something like that:
var imgUrl = "http://image-generator.aspx?guid=1234"; // that url generates image
<img src="/ImageGen.ashx?image=@imgUrl" />
Hi, Ivan,
No problem with your razor, it'll work just fine in a macro.
You'll need to use ImageGen Professional to make the remote request, though. And add the remote domain to the /config/imagegen.config file so that it is allowed (by default ImageGen doesn't allow remote requests to protect your server from being abused as a resizing engine for everyone on the internet).
See the docs for further info about using remote domains.
cheers,
doug.
Hi Doug.
Thank you for the answer!
is working on a reply...