umbraco-packages - Our.Umbraco.AzureCDNToolkit 0.1.0-alpha-000006

Azure CDN Toolkit for Umbraco

PM> Install-Package Our.Umbraco.AzureCDNToolkit -Version 0.1.0-alpha-000006 -Source https://www.myget.org/F/umbraco-packages/api/v3/index.json

Copy to clipboard

> nuget.exe install Our.Umbraco.AzureCDNToolkit -Version 0.1.0-alpha-000006 -Source https://www.myget.org/F/umbraco-packages/api/v3/index.json

Copy to clipboard

> dotnet add package Our.Umbraco.AzureCDNToolkit --version 0.1.0-alpha-000006 --source https://www.myget.org/F/umbraco-packages/api/v3/index.json

Copy to clipboard
<PackageReference Include="Our.Umbraco.AzureCDNToolkit" Version="0.1.0-alpha-000006" />
Copy to clipboard
source https://www.myget.org/F/umbraco-packages/api/v3/index.json

nuget Our.Umbraco.AzureCDNToolkit  ~> 0.1.0-alpha-000006
Copy to clipboard

> choco install Our.Umbraco.AzureCDNToolkit --version 0.1.0-alpha-000006 --source https://www.myget.org/F/umbraco-packages/api/v2

Copy to clipboard
Import-Module PowerShellGet
Register-PSRepository -Name "umbraco-packages" -SourceLocation "https://www.myget.org/F/umbraco-packages/api/v2"
Install-Module -Name "Our.Umbraco.AzureCDNToolkit" -RequiredVersion "0.1.0-alpha-000006" -Repository "umbraco-packages" -AllowPreRelease
Copy to clipboard

Umbraco Azure CDN Toolkit

Azure Logger

The AzureCDNToolkit package allows you to fully utilise and integrate the Azure CDN with your Umbraco powered website using a "Origin Push" approach.

To Push or to Pull You can use both a Push or a Pull origin approach to the Azure CDN with Umbraco since the release of the new Azure CDN (AzureEdge), this package supports only Push origin (storage) currently however it maybe extended to also support Pull in the future.

There are three file types that should be served from CDN if you have one.

  • Assets - css, js & static images used by templates etc..
  • Images managed by Umbraco - cropped or not
  • Files - pdfs, docx etc

The toolkit depends on two packages being installed, these are the UmbracoFileSystemProviders.Azure and the ImageProcessor.Web Azure Blob Cache plugin

Once installed and setup the package provides UrlHelper methods to use for resolving url paths for assets and Image Cropper urls and also a value converter for the TinyMce editor so that images within the content are also resolved.

Some examples:

@Url.ResolveCdn("/css/style.css")

@Url.GetCropCdnUrl(Umbraco.TypedMedia(1084), width: 150)

<div class="brand" style="background-image: url('@Url.ResolveCdn(home.GetPropertyValue<string>("siteLogo") + "?height=65&width=205&bgcolor=000", false, false)')"></div>

When using these methods, the toolkit will attempt to resolve the urls to their absolute paths and crucially ensures that a cache busting querystring variable is added. Without the cache busting using the Azure CDN can become tricky when you want to update with new content. This has the added benefit of avoiding your site needing to handle any 301 redirects and also gets some optimisation benefit (PageSpeed etc).

Some examples:

  1. <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css">
  2. <img src="/media/1052/jan.jpg?anchor=center&mode=crop&width=150&rnd=131070397620000000"/>
  3. <a href="/media/1050/blank.docx">Download Word Doc</a>

Becomes:

  1. <link rel="stylesheet" type="text/css" href="https://azurecdntoolkitdemo.azureedge.net/assets/css/bootstrap.min.css?v=0.0.1">
  2. <img src="https://azurecdntoolkitdemo.azureedge.net/cloudcache/e/0/2/7/d/2/e027d2acab49ab523db3ece72c0651310dd3320c.jpg"/>
  3. <a href="https://azurecdntoolkitdemo.azureedge.net/assets/media/1050/blank.docx?rnd=131070387800000000">Download Word Doc</a>

Build status

Note: this package is not compatible with Slimsy v1 (it should work with the upcoming Slimsy v2 using img srcset)

Documentation

  1. Azure Setup
  2. Umbraco Setup
  3. Umbraco Implementation
  4. Umbraco Dashboard
  5. Reference

Installation

Both NuGet and Umbraco packages are available.

NuGet Packages Version
Release NuGet download
Pre-release MyGet download
Umbraco Packages
Release Our Umbraco project page
Pre-release AppVeyor Artifacts
  • Any 0.0
    • UmbracoCms.Core (>= 7.3.8)
    • WindowsAzure.Storage (>= 6.2.0)
  • .NETFramework 4.5: 4.5.0.0

Owners

Jeavon Leopold

Authors

Jeavon Leopold

Project URL

https://github.com/CrumpledDog/Umbraco-AzureCDNToolkit

License

Apache-2.0

Tags

umbraco azure cdn media

Info

4143 total downloads
82 downloads for version 0.1.0-alpha-000006
Download (18.66 KB)
Found on the current feed only

Package history

Version Size Last updated Downloads Mirrored?
0.2.0-alpha-000076 6.02 KB Tue, 30 Mar 2021 15:10:10 GMT 58
0.2.0-alpha-000075 6.02 KB Mon, 03 Feb 2020 20:58:38 GMT 74
0.2.0-alpha-000062 5.99 KB Tue, 12 Jun 2018 10:12:58 GMT 273
0.2.0-alpha-000060 5.99 KB Thu, 14 Dec 2017 15:18:50 GMT 146
0.2.0-alpha-000054 5.99 KB Tue, 31 Jan 2017 13:59:27 GMT 213
0.2.0-alpha-000053 5.97 KB Tue, 31 Jan 2017 13:41:53 GMT 89
0.2.0-alpha-000052 5.97 KB Tue, 31 Jan 2017 11:09:40 GMT 87
0.2.0-alpha-000051 5.97 KB Mon, 30 Jan 2017 13:37:30 GMT 85
0.2.0-alpha-000050 5.97 KB Mon, 30 Jan 2017 13:31:31 GMT 91
0.2.0-alpha-000049 5.96 KB Mon, 23 Jan 2017 17:02:39 GMT 99
0.2.0-alpha-000048 5.93 KB Wed, 16 Nov 2016 17:49:34 GMT 99
0.2.0-alpha-000046 5.93 KB Tue, 08 Nov 2016 16:25:50 GMT 84
0.2.0-alpha-000045 5.93 KB Tue, 08 Nov 2016 16:24:51 GMT 85
0.2.0-alpha-000041 5.93 KB Mon, 26 Sep 2016 08:29:43 GMT 79
0.2.0-alpha-000040 5.93 KB Wed, 27 Jul 2016 14:24:33 GMT 112
0.2.0-alpha-000039 5.93 KB Fri, 15 Jul 2016 15:49:12 GMT 91
0.2.0-alpha-000038 5.93 KB Mon, 04 Jul 2016 08:33:32 GMT 84
0.2.0-alpha-000037 5.93 KB Wed, 29 Jun 2016 16:49:40 GMT 91
0.2.0-alpha-000036 5.93 KB Tue, 21 Jun 2016 18:00:04 GMT 80
0.2.0-alpha-000035 5.93 KB Thu, 02 Jun 2016 10:04:18 GMT 84
0.2.0-alpha-000033 5.93 KB Wed, 01 Jun 2016 18:02:26 GMT 77
0.2.0-alpha-000032 5.93 KB Wed, 01 Jun 2016 14:24:08 GMT 85
0.2.0-alpha-000030 5.93 KB Wed, 01 Jun 2016 14:18:45 GMT 85
0.2.0-alpha-000027 5.93 KB Wed, 01 Jun 2016 13:39:10 GMT 79
0.2.0-alpha-000026 5.93 KB Wed, 01 Jun 2016 12:06:09 GMT 81
0.1.0-alpha-000022 5.93 KB Wed, 01 Jun 2016 11:28:37 GMT 78
0.1.0-alpha-000021 5.93 KB Wed, 01 Jun 2016 11:27:24 GMT 75
0.1.0-alpha-000020 5.93 KB Wed, 01 Jun 2016 11:20:45 GMT 92
0.1.0-alpha-000019 5.93 KB Wed, 01 Jun 2016 11:16:51 GMT 90
0.1.0-alpha-000017 5.93 KB Fri, 27 May 2016 10:59:39 GMT 84
0.1.0-alpha-000016 5.9 KB Fri, 27 May 2016 10:09:10 GMT 93
0.1.0-alpha-000015 18.69 KB Thu, 26 May 2016 11:30:52 GMT 92
0.1.0-alpha-000014 18.7 KB Tue, 24 May 2016 15:57:59 GMT 88
0.1.0-alpha-000013 18.66 KB Mon, 23 May 2016 18:54:55 GMT 88
0.1.0-alpha-000012 18.66 KB Mon, 23 May 2016 17:48:58 GMT 80
0.1.0-alpha-000011 18.66 KB Mon, 23 May 2016 17:27:35 GMT 84
0.1.0-alpha-000010 18.66 KB Mon, 23 May 2016 17:07:49 GMT 89
0.1.0-alpha-000009 18.66 KB Mon, 23 May 2016 16:30:30 GMT 94
0.1.0-alpha-000008 18.66 KB Thu, 19 May 2016 15:40:04 GMT 83
0.1.0-alpha-000007 18.66 KB Thu, 19 May 2016 15:34:22 GMT 86
0.1.0-alpha-000006 18.66 KB Thu, 19 May 2016 15:15:06 GMT 82
0.1.0-alpha-000005 18.65 KB Thu, 19 May 2016 11:45:26 GMT 83
0.1.0-alpha-000004 18.65 KB Thu, 19 May 2016 10:19:43 GMT 84
0.1.0-alpha-000003 18.65 KB Tue, 17 May 2016 18:56:40 GMT 87