Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have finally got my media being served from the CDN but confusingly with mixed results which I want to understand .
On a page I have an MVC partial view that renders some media as follows:
@Url.GetCropCdnUrl(slide.GetPropertyValue<IPublishedContent>("image"), imageCropMode: ImageCropMode.Crop, width: width, height: height)
This renders relative urls to the media items and if you try to visit on of the paths it redirects you to the CDN url.
Elsewhere on the same page there is content that is loaded in via an API call which gets the media urls as follows:
urlHelper.GetCropCdnUrl(media, width, height, imageCropMode: ImageCropMode.Crop).ToString();
The urls returned by this are absolute to the CDN.
Why do they behave differently given that I belive they are ultimately calling the same extension method?
Thanks, Simon
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Mixed Urls on Page with GetCropCdnUrl
I have finally got my media being served from the CDN but confusingly with mixed results which I want to understand .
On a page I have an MVC partial view that renders some media as follows:
This renders relative urls to the media items and if you try to visit on of the paths it redirects you to the CDN url.
Elsewhere on the same page there is content that is loaded in via an API call which gets the media urls as follows:
The urls returned by this are absolute to the CDN.
Why do they behave differently given that I belive they are ultimately calling the same extension method?
Thanks, Simon
is working on a reply...