I am not able to have url of the image component,though a part of tcm-id of component is showing as follows:
<img src="@Model"/>
is rendering as <img src="23746"/>
@Model.ToString()
is rendering as Image: 23746
But when I use @Model.Url
, it returns null value.
Also, I have already published another component having that image component,and its success also.
What might be the issue?
EDIT 1:
"Image: 23746" is the tcm id of the image component which I am trying to map
UPDATE 1
After some tweaks, now the image url is coming, but an error of "image not found" is coming as follows:
Item '/en/media/myimage_tcm1010-23744.svg' not found for Localization '1010'. Sending HTTP 404 (Not Found)
IMultimedia
and the[Multimedia]
Attribute/en/media/myimage.svg
If it works, then the Component Template code is not proper at your end, and also can be a case where the image component is getting published with two dynamic CTs. Please confirm if this is happening.