#Using `@unpic/astro`

1 messages · Page 1 of 1 (latest)

dusky glade
#

This is probably a dumb question, really, but I have two potentially related questions.

  1. Without unpic, my 202kB PNG file is converted to 21kB webp file. With unpic and local build, the same file is converted to a bunch of files, all of which are larger than the original (dimension-wise and size-wise). The smallest is the same dimension as the original, at 266kB.

  2. Deploying to vercel, one image gets built (208kB png image at /_astro/test.BTqkgR0v.png). The image src is /_vercel/image?url=%2F_astro%2Ftest.BTqkgR0v.png&w=600&q=75. This doesn't exist.

Why does this happen? Do I need Vercel integration (and take advantage of Vercel's image optimization stuff) for this to work? Can't I use Sharp? I just want static, responsive webp files... Similar to what Gatsby does by default.

#

Adding vercel integration and setting

  adapter: vercel({
    imageService: true,
  }),

gets the image shown. But srcset doesn't appear.