I am planning to use Azure CDN on the top of Sitecore Media library, from my understanding, Azure CDN does not support lazy loading and the only easy way is the root described in the Sitecore Azure CDN connector (basically creating MediaLibrary folder structure and files on the publish event) The problem that I can see it is with resized images, in Sitecore, you can call resize dynamically an item passing height and width in the url, but I am not sure how to handle this from the CDN point of view. Happy to know your opinion and workaround this limitation. Stelio
Sitecore Media Library & Azure CDN
2k Views Asked by Stelio At
2
There are 2 best solutions below
1
mikaelnet
On
Well, maybe not a solution in your case, but I'd go for another CDN. This limitation in Azure CDN just puts too great constraints on your solution. As you describe, you should really utilize the resize function in Sitecore, in order to keep a good architecture and maintainable code.
Other people have also faced the same problem and went for other CDN options, such as Akamai and AWS CloudFront: http://feedback.azure.com/forums/169397-cdn/suggestions/3046714-custom-origin-support-to-cdn
Related Questions in AZURE
- How to update to the latest external Git in Azure Web App?
- I need an azure product that executes my intensive ffmpeg command then dies, and i only get charged for the delta. Any Tips?
- Inject AsyncCollector into a service
- mutual tls authentication between app service and function app
- Azure Application Insights Not Displaying Custom Logs for Azure Functions with .NET 8
- Application settings for production deployment slot in Azure App Services
- Encountered an error (ServiceUnavailable) from host runtime on Azure Function App
- Implementing Incremental consent when using both application and delegated permissions
- Invalid format for email address in WordPress on Azure app service
- Producer Batching Service Bus Vs Kafka
- Integrating Angular External IP with ClusterIP of .NET microservices on AKS
- Difficulty creating a data pipeline with Fabric Datafactory using REST
- Azure Batch for Excel VBA
- How to authenticate only Local and Guest users in Azure AD B2C and add custom claims in token?
- Azure Scale Sets and Parallel Jobs
Related Questions in SITECORE
- How to Customize Sitecore Copy operation
- Joomla 5..0.3 delay in search
- What's the event for when a Branchitem has finished creating?
- Convert Sitecore data sources to Guid, programatically
- How to specify an existing ItemId While uploading Media Items to Sitecore XM Cloud using UploadMedia mutation?
- Sitecore to WordPress migration
- Why changing template in Sitecore using powershell script creates a version in English language even if there no version exists?
- I want to convert sitecore search facet filter from multiple to single
- Sitecore - select fields and write to an excel sheet by changing the field names in Powershell
- Coveo for Sitecore: Precondition failed: The parameter 'p_ApiKey' must not be an empty string
- In Sitecore 10, why would my Content Editor Panel not open
- Not loading CSS files after login to my sitecore instance
- AWS - Amazon.Extensions.S3.Encryption.AmazonS3EncryptionClientBase is attempting to implement an inaccessible interface
- Cannot use import statement outside a module - jest + nextj.js
- To get the sitecore username who created sitepage
Related Questions in CDN
- CDN Detector Extension / Script
- Vite Serving Libraries without CDN
- Use Next.js project as a script tag in html file
- Serve static site on S3 + CloudFlare with Apache retaining the source URL
- Sellapp integration with React
- Is a CDN service worth it for storing images or can I use the MongoDb and my server to serve them?
- Azure CDN and caching control show TCP_MISS
- Next.jS SSG on s3bucket doesn't work on refresh
- I want to cache cloud function data in to cdn. Whatever i tried is caching in browser only
- How to get statistics about uri in azure
- Can't import PrimeVue InputOpt in CDN project
- how to reduce the website image to 2-5kb per for an ecommerce website?
- CDN for asset delivery with auth, locally run and CI support
- Can't render DataTable using Vue and PrimeVue from CDN
- How can I publish a reusable react component into CDN?
Related Questions in SITECORE-MEDIA-LIBRARY
- How can I override Sitecore’s Media Handler to force user to redirect to login page if user is not authenticated
- Sitecore - How to prevent the anonymous users to access media library items in sitecore?
- Sitecore Media Library - missing Alt Text
- How to expose Sitecore media URLs to outside world?
- Is there a way to force sitecore users to upload media as file?
- Sitecore images in the Media Library are not displaying in Page Editor on CM instance, but appear in the Media Library and on CD instance
- Sitecore media not found for other languages
- How to restrict certain media types from being uploaded to custom media library folder in Sitecore 8 Content editor
- The "Type" attribute of Image in "Sitecore Select Media" popup is showing as "Image" instead of "Jpeg"
- "The maximum amount of data that you can upload is NaN undefined" error is coming on uploading an image using "Upload Media" button in Sitecore
- how to add a file to a MediaItem using SetStream?
- Restrict image upload size in sitecore
- Augmenting sitecore's media library
- How to stop uploading WFFM media files in Sitecore Media library folder and get byte array of uploaded media file
- Getting 404 when opening Sitecore Media Library
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
If you are using Azure PaaS and making use of WebRoles (such as when using the Sitecore Azure Module) then you should be able to more easily integrate the cloud service with Azure CDN.
I'm not sure exactly what your plans were with integrating with Azure, but rather than worrying about any Sitecore handlers and pushing files to Azure, I suggest that you configure the CDN endpoints and then redirect all your media request to the
/cdnfolder. This will cause Azure to cache your dynamic content, taking into account any url parameters (like resizing). If the content is not cached then the request should be retrieved from Sitecore and then cached for any future requests, working like an edge caching server.The easiest way to take advantage of this is to set the media prefix link:
And then you can make use of the URLRewrite Module to map
cdn/mediaback to~/media. Or just add handlers for this in Sitecore also:You may wish to only do this on your CD environments. Additionally, you could also take advantage of this for your static images. You would need to make sure they were all prefixed
/cdnalso, but if the folder was/cdn/imagesthen you could have a different URL Rewrite Rule to map that back to/images.Some additional info:
Using cloud services with the CDNonwardsUnfortunately I don't have access to an Azure instance so unable to test this.
UPDATE: I wrote an article on integrating Sitecore with Azure, although it's generic enough to work with any CDN provider and any version of Sitecore if you overwrite the media handler. You can read more here: Setting up Azure CDN to deliver your Sitecore Media