This content originally appeared on Jonnie Hallman (@destroytoday) and was authored by Jonnie Hallman (@destroytoday)
A reader pointed out that the images on my RSS feed don’t load. I was surprised by this because they load fine for me on FeedBin. Looking at the URLs being generated, I immediately realized the issue. To play it safe (I assume?), Contentful returns asset URLs without an http or https protocol (e.g., //path/to/my/asset.webp
). This lets the browser match the protocol of the current page’s URL. While my RSS reader doesn’t have a problem loading images, my guess is that other readers handle URLs without protocols the same way that browsers do when entered in the address bar—prepending file:
, assuming it’s a local file. While I don’t love that I needed to do this, I added https:
to all asset URLs.
This content originally appeared on Jonnie Hallman (@destroytoday) and was authored by Jonnie Hallman (@destroytoday)
Jonnie Hallman (@destroytoday) | Sciencx (2020-05-19T08:41:00+00:00) Contentful asset URLs. Retrieved from https://www.scien.cx/2020/05/19/contentful-asset-urls/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.