I've written an APIcontroller (inheriting from UmbracoApiController) that fetches some items. One of their properties is an Image.
In the V7 version, Image.Url would yield the Url for the image.
In the V8 version, this Url is always empty.
Some extra info:
In ModelsBuilder, I do "this.Value<IPublishedContent>("image")", but the Url is empty.
If I use the image's Id, I can do "var image = Current.UmbracoHelper.Media(a.Image.Id)", but the Url is always empty.
I could maybe use a.Image.UmbracoFile.Src, because it is the same as the url (/media/1004/truckers-guide-agw-photo1.jpeg), but it feels wrong to just assume that.
I had been experimenting with GoldenGate (a uSync extension to convert from Umbraco 7 to Umbraco 8), and one of my custom properties in the Image MediaType was set to VaryByCulture.
Umbraco doesn't support variations on MediaTypes (yet?), so somewhere under the hood this caused a problem.
If you are experiencing a similar problem, I highly doubt the reason is the same.
Image.Url always empty. Correct way to access it?
Hi,
I've written an APIcontroller (inheriting from UmbracoApiController) that fetches some items. One of their properties is an Image.
In the V7 version, Image.Url would yield the Url for the image.
In the V8 version, this Url is always empty.
Some extra info:
Why would this be empty every time?
Hey,
Did you fix this?
Turns out it was my own fault.
I had been experimenting with GoldenGate (a uSync extension to convert from Umbraco 7 to Umbraco 8), and one of my custom properties in the Image MediaType was set to VaryByCulture.
Umbraco doesn't support variations on MediaTypes (yet?), so somewhere under the hood this caused a problem.
If you are experiencing a similar problem, I highly doubt the reason is the same.
is working on a reply...