Placeholder slot for `<NuxtImg>`
I've been thinking of how to achieve more sophisticated placeholders using <NuxtImg> than what the placeholder prop allows for. Being able to define the placeholder in a slot would allow for greater flexibility:
<NuxtImg>
<template #placeholder>
<SkeletonLoader />
</template>
</NuxtImg>
If this is a desirable addition, I am willing to implement it.
That would be great, dealing with placeholder could be improved !!
yes please 😀
@DamianGlowala I think this is an awesome idea! Please if you have time, create a PR with the implementation proposal :)
I made a PR, but there are some tests failing. Can you check it please @DamianGlowala? This is officially my first contribution so I will be happy if someone checks it out.
@Baroshem I have fixed the tests, added examples, and addressed your suggestions. Everything seems to be working now.