Skip to content

Fix for 'Waiting for the @astrojs/image integration' on Vercel


I tried to upload my Astro site to Vercel, but I kept getting an infinite "Waiting for the @astrojs/image integration..." message. I updated my Astro version, no help. Then I tried installing the @astrojs/vercel package, no help, don't bother trying it as you don't need it unless you are using SSR instead of SSG.

Screenshot of Vercel saying 'Waiting for the @astrojs/image integration...'

Then I found out what the problem was: for some reason the Vercel build process does not support Astro's Avif image generation! I removed the Avif format from my picture components by adding formats={['jpg', 'webp']} to them, which disables the automatic Avif generation.

formats={['jpg', 'webp']} // <---- This here fixed the builds
widths={[1200, 800, 600]}
sizes="(min-width: 1200px) 1200px, 100vw"

Now, the Vercel build worked! I still got the same "Waiting for the @astrojs/image integration..." message, but this time it was followed by a "Completed" message. If you are using a png image, then use formats={['png', 'webp']} instead.

Screenshot of Vercel succesfully building an Astro site

So, if you are also having the infinite image integration message on Vercle, try removing Avif generation from your images. I hope this gets patched soon, though, as Avif images are very beneficial.