79464068

Date: 2025-02-24 15:32:14
Score: 0.5
Natty:
Report link

I worked out that there had to be some extra configuration to make this work. In my case, I was using Storyblok as a CMS, and NuxtImage includes support for that platform (along with many others).

I googled "NuxtImg Storyblok" and found this link: https://v0.image.nuxtjs.org/providers/storyblok

In short, if your provider/CMS is supported, you need to add something like this to your nuxt.config.ts:

 image: {
    storyblok: {
      baseURL: 'https://a-us.storyblok.com'
    }
  }

and then specify the provider on the NuxtImg tag:

<NuxtImg
:src="https://...image.webp"
sizes="100vw sm:50vw md:100px"
provider="storyblok"
loading="eager"
class="aspect-3/2 w-full bg-gray-50 object-cover sm:absolute sm:inset-0 sm:aspect-auto sm:h-full"
/>
Reasons:
  • Blacklisted phrase (1): this link
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
Posted by: Fijjit