Being able to leveage Cloudflare Image optimization
As a Solution Architect, I aim to deliver the best possible solution and ensure a new build performs well against metrics such as Google Lighthouse.
When building a PaaS solution that hosts images within the DAM, I can use Cloudflare image resizing to deliver this feature, but I later learned that this feature isn't available for SaaS solutions.
I want to deliver images that exactly match the image container on the page and support different aspect ratios for different devices without requiring the user to choose multiple images.
I want to deliver the optimal image type for the browser.
I want to deliver an efficient caching strategy.
The DAM has renditions; these are great for cropping and resizing images and delivering the general aspect ratios used by the site. But the overhead is massive to create a rendition for every single image requirement on the site.
The CDN used by the DAM has some basic image manipulation features, but they are not as comprehensive as Cloudflare.
The DAM can convert an image to WEBP, but doesn’t support AVIF. Cloudflare will do a dynamic conversion if the browser supports AVIF.
When assets are directly served from the DAM, the cache header is no-store, which means the asset is always requested by the browser… not great for performance.
Ideally, it would be great to use Cloudflare, just like PaaS, but in reality all we need is to deliver the most optimised and performant images.
Improved dynamic resizing functionality.
AVIF support.
Control over the caching.
Vercel does have image optimisation features, but these incur extra costs, and in this case, the contracting was handled by Optimizely.