question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

b-img or b-img-lazy "@error" support

See original GitHub issue

I am currently not able to use b-img-lazy or b-img for my needs because I also need to use @error for the image, so if an image doesn’t load properly, I can handle it cleanly.

Is there any way I can use @error within these b-img components? Or is there a way I can use the lazy-loading functionality within the basic img element?

This is an example of what I’m currently doing: <img :src="item.image" @error="noImage(item)" class="rounded img-fluid" />

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
tmorehousecommented, Nov 25, 2019

You should be able to access the native event via @error.native="noImage(item)"

<b-img> is a functional component, so you shouldn’t need the .native modifier (I think, but I may be wrong).

For <b-img-lazy> (which is a statefull component instance) you will need the .native event modifier.

1reaction
tmorehousecommented, Apr 1, 2020
<b-avatar>
  <img src="foobar" class="img-fluid" @error="handleError">
</b-avatar>
Read more comments on GitHub >

github_iconTop Results From Across the Web

bootstrap-vue - UNPKG
n return true\n }\n}\n\n/**\n * Warn when no Promise support is given\n ... },\n BImg: {\n blankColor: 'transparent'\n },\n BImgLazy: {\n blankColor: ......
Read more >
Image | Components - BootstrapVue
BootstrapVue's image components support rounded images, thumbnail styling, alignment, and even the ability to ... <b-img-lazy>, BImgLazy, bootstrap-vue ...
Read more >
b-card-img-lazy not firing error event on image not found
I have a b-card-img-lazy , as the title suggests, but it does not fire the load event when the image is fully "downloaded"...
Read more >
Image Not Displaying In Loop Vue.Js - ADocLib
JavaScript ES6 promise for loop; How to capture vuejs errors from a ... Support for lazy loaded images is available via the <bimglazy>...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found