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

How to use @/assets in error param? #466

Open
GsHeri opened this issue Apr 29, 2021 · 0 comments
Open

How to use @/assets in error param? #466

GsHeri opened this issue Apr 29, 2021 · 0 comments

Comments

@GsHeri
Copy link

GsHeri commented Apr 29, 2021

i'm trying to display a default-user image for user avatars, if they 404.

with this code

                  <div v-lazy-container="{ selector: 'img', error: '@/assets/img/user/default-user.svg' }">
                    <img :data-src="item.user_profile_pic" class="user-img circle-avatar fiftyPx">
                  </div>

working images are displayed fine, but 404 are evaluated to localhost:8888/user/@/assets/img/user/default-user.svg
how can i make the error files work and be evaluated correctly?

( this <img src="@/assets/img/user/default-user.svg"> on its own works fine, but i want it only for 404 )

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

1 participant