- Published on
Next.js image optimisation is great for photos but can break SVGs and soften PNGs, so a headless SitecoreAI front end needs to know what type of file each image is. That's easy with Media Library URLs and surprisingly hard with Content Hub public links. This post covers why different image types need different handling, and how to get file type information from Content Hub through Sitecore Connect for Content Hub to a shared Next.js image component.
