You aren't really explaining the problem. Without knowing more about what you are doing it will be impossible for someone to help.
Try sharing appropriate code snippets (e.g. your view if it's not to big). An explanation of your DataType and what you've tried in order to debug it.
With that people would be able to either help by pointing you in the right direction, provide a solution or ask more targeted questions to gain further insight in order to help.
pass in imageId variable into the .TypedMedia(imageID) function
then when you use the imageUrl variable make sure you add .Url at the end
an example of what i mean is:
var imageLocation = Model.Content.Descendants();
var imageId = imageLocation.GetPropertyValue<string>("imageAlias");
var imageSrc = imageLocation.TypedMedia(imageID);
<img src="@imageSrc.Url" />
The above should be the sort of thing your looking for it works by getting the image path, then you define the image by it's alias which returns it's id.
You then turn this to a string and pass it into the .TypedMedia() function which returns the media picker value. Then when using the imageSrc variable ensure to add ".Url" at the end to convert to a url
image src empty
I am encountering this issue since tha last weeks, and I am not able to find a fix.
Would be grateful if someone could help.
Thanks.
hi k,
Can you provide the code ?
Hi K,
You aren't really explaining the problem. Without knowing more about what you are doing it will be impossible for someone to help.
Try sharing appropriate code snippets (e.g. your view if it's not to big). An explanation of your DataType and what you've tried in order to debug it.
With that people would be able to either help by pointing you in the right direction, provide a solution or ask more targeted questions to gain further insight in order to help.
Thanks,
Are you using all the following steps:
then when you use the imageUrl variable make sure you add .Url at the end
an example of what i mean is:
The above should be the sort of thing your looking for it works by getting the image path, then you define the image by it's alias which returns it's id. You then turn this to a string and pass it into the .TypedMedia() function which returns the media picker value. Then when using the imageSrc variable ensure to add ".Url" at the end to convert to a url
is working on a reply...