CrumpledDog / Umbraco-AzureCDNToolkit

Makes it easy to fully utilise the Azure CDN with a Umbraco website
13 stars 14 forks source link

Azure cdn toolkit provide me guid based image name after image cropping instead of original image name #29

Open rahossain opened 4 years ago

rahossain commented 4 years ago

Hi , I was using GetCropCdnUrl method to get cropped image url from api. but it provided me GUID based image name in the url instead of original image URL. For example, image URL"https://umbraco cms url/media/3432/thumbnail-video-contenu1a-1920x1080.jpg" become "https://cdn url/cache/1/4/9/b/1/b/149b1b494495df678ac2ea6501c0548d0fdc7e24.jpg" after cropping.

Is there any way to keep file name same for both original image name and cropped image name? Can we change/define default folder hierarchy from 6 to 2 in config file?

c9mb commented 4 years ago

I don't believe that the CDN toolkit creates the cached entries on Azure, but that it simply looks them up and builds a local map-table (which is what you see in the Umbraco BackOffice plugin) so the media url can be replaced with the cache url in the rendered html using the GetCropCdnUrl method.

I believe that it's likely ImageProcessor's AzureBlobCache plugin that creates the files in the nominated cache folder on the AzureStorage account.