image
image copied to clipboard
Dropped srcset candidate "<URL>"
I get this error only when I use this module.
Failed parsing 'srcset' attribute value since it has an unknown descriptor.
Hi,
I have been having the same problem recently. It turns out it was because I didn't specify default image size in pixels but rather in view-width. Once I put some appropriate default size in pixels the message disappeared. Something like this:
<!-- Value for sizes was "90vw lg:200px xl:500px" -->
<NuxtImg
format="webp"
:src="`/media/plays/${mainAccent.slug}/photos/7.jpg`"
:alt="`${mainAccent.name} - Poster`"
class="img-fluid w-100 border border-3"
sizes="250px lg:200px xl:500px"
:placeholder="[5]"
loading="lazy"
/>
I am not sure if that's an error on my side or if NuxtImage is intended to work like this. Hope this helps someone.
Closing as the solutions was given.
Feel free to reopen if needed :)