Hi !
I am trying to get <Image /> component fully working with Vercel. Currently it does the job (as it compress images).
However, it's impossible for me to obtain any srcset. Here is the rendered HTML for an image :
<img src="/_vercel/image?url=https%3A%2F%2Fa.storyblok.com%2Ff%2F251117%2F1200x600%2F668ce2e67d%2Fstrapi-cms.png&w=1200&q=100" alt="Image de présentation du CMS Strapi avec le logo" class="rounded-2xl shadow-2xl object-cover h-full w-full" width="1200" height="600" loading="lazy" decoding="async">
I think everything is well configured ...
ASTRO / VERCEL CONFIG
import vercel from '@astrojs/vercel/serverless';
adapter: vercel({
imageService: true,
imagesConfig: {
sizes: [640, 750, 828, 1080, 1200],
formats: ["image/avif", "image/webp"],
domains: ['a.storyblok.com'],
}
})
<Image
{...getIllustationAttributes(article.image)}
class="rounded-2xl shadow-2xl object-cover h-full w-full"
/>
The getIllustationAttributes function renders src/alt/width/height depending of my API.