Past Issues with Content Delivery NetworksIn the past, I have migrated servers and change the image delivery system (either via CDN or served locally) for this blog multiple times. This has led to series of broken images. In other cases, it was a matter of mis-configuration of Gumlet or BunnyCDN. In January 2022, I was able to resolve this matter when I migrated this blog to its own subdomain.In a matter of time, images for all 300 plus blog posts (that have been published at the time of writing this post) should start displaying correctly.
Click below for the audio version of this post
Which CDN to use: BunnyCDN, or Gumlet ?Over the past few years I have dabbled around a bit with CDN or Content Delivery Networks, and also written quite a bit about them on this blog. You can find some of my posts by clicking here. In this post, I will update on the two CDNs you will find on this blog going forward: Gumlet and BunnyCDN. Read to learn more. This post captures the essence of what I did wrong.
…all of the feature images… and some inline images were not visible. My apologies for that. It was a case of over zealous CDN settings. Or not realizing I was making a mistake. – Amar Vyas,In order to address this issue, in September 2021 I even wrote on this blog that I am working to resolve this issue once and for all. Ironically, the images in that post itself would not load and I had to keep just the feature image.
Testing the CDN for imagesI have created a set of 25 banners to be used as header images for this blog. These will appear in a random sequence every time you refresh the page, or click on a new blog link. Some of these colourful banners can bee seen below. I have limited the width of each image to 450 px for better display. For practical purposes, we will primarily use BunnyCDN on this site for loading external images. The images that are stored locally are served using Shortpixel Adaptive Images plugin, which in turn uses BunnyCDN. Therefore we will have two sets of CDNs for this site- BunnyCDN as primary and Gumlet as a backup.
Let us see some of the banners
Image served via Gumlet
What about Webp?Wordpress by default does not allow uploading of webp images for security reasons. Therefore, we will test from BunnyCDN and Gumlet only.
Webp Image served via Gumlet
Finally, are we ignoring AVIF?At the time of writing this post, avif image format has very little acceptance, it may or may not become mainstream. We will therefore try out a different set of images and leave them as is in this post. They may or may not display for you, the reader – depending on the device, operating system, or the browser you use. Note: similar to webp, WordPress by default does not allow uploading of avif images for security reasons.
AVIF Image served via Gumlet–>defining the “Width” parameter into Gumlet (typically entered inline as img.avif?w=450″) is not working. Therefore you may see an oversized image compared to the rest of the lot.
Wraping it up: Gumlet and BunnyCDN works!There are advantages and limitations of using the WordPress plugin offered by either of the two Content Delivery Networks I use (BunnyCDN or Cumlet). Using a workaround, i.e. Shortpixel Adaptive Images plugin, solved the problem of disappearing images for now. The images and videos from Gumlet and BunnyCDN- I insert the direct link anyways. In a few day’s time, I will remove all other ‘dangling’ links to other CDNs (except Play.ht and Spreaker for Audio). Once and for all this nightmare of broken images should end that way. Update February 2022: By the end of this month, all images would be served from either of the above two sources. With over 300 posts and 1,000 images (not to mention broken links and other legacy “ghosts of the past”, this project took longer than anticipated.
This post was updated on 2022-03-07