Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebP conversion seems not working #299

Open
IlyaShkurenko opened this issue Jan 7, 2021 · 1 comment
Open

WebP conversion seems not working #299

IlyaShkurenko opened this issue Jan 7, 2021 · 1 comment

Comments

@IlyaShkurenko
Copy link

IlyaShkurenko commented Jan 7, 2021

<figure :key="src">
    <picture>
      <source :data-srcset="${src}?webp" type="image/webp"  v-if="src">
      <img :data-src="`${src}`"
           :title="title"
           :width="width"
           :height="height"
           class="lazyload"
           src="/img/loading-img.png">
    </picture>
  </figure>
using lazysizes lib for lasy load with vueJS and seems it's not converting to webP because 
webp: {
        quality: 10
 }
option doesn't affect. Maybe it's working only if images are in static folder because mine are external? Also didn't find some changes in sizes loaded content or performance
@gekkedev
Copy link

As I ran into the same issue, it seems to be related to the way Vue loads images. Image optimization must be possible at build time, because if done on-the-fly during run time it wouldn't have a good impact on performance at all. A workaround is described here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants