nuxt-responsive-loader icon indicating copy to clipboard operation
nuxt-responsive-loader copied to clipboard

Webp support is broken

Open mhaskymedia opened this issue 4 years ago • 4 comments

When using the below (example) in NUXT, i get the error: Format "webp" not supported. Filing issue here, because WebP support is mentioned as a feature, and "yarn add nuxt-responsive-loader" should be plug and play.

<picture>
    <source :srcset="require('~/assets/images/something.png?format=webp').srcSet" sizes='(min-width: 1024px) 20vw, 30vw' type="image/webp">
    ....
</picture>
  • I am using the sharp adapter (verified)
  • If webp is added to the default MIMES and EXTS in node-modules/responsive-loader/lib/index.js it works.

mhaskymedia avatar Apr 26 '21 08:04 mhaskymedia

@mhaskymedia Did you manage to get it working?

dnovosad1 avatar Nov 24 '21 21:11 dnovosad1

@dnovosad1 @mhaskymedia you have to add responsive-loader to you package.json next to nuxt-resposnive-loader. It worked for me. yarn add responsive-loader

bydeusz avatar Dec 02 '21 23:12 bydeusz

As @tadeuszderuijter said, you can force the version of responsive-loader used by the package by : npm install --save-dev [email protected]

Ratatinator97 avatar Dec 06 '21 10:12 Ratatinator97

@Ratatinator97 thank you, that solved the issue for me!

luksak avatar Jan 05 '22 15:01 luksak