[Help]: How to handle missing images? #864
-
SummaryI'm trying to add some graceful handling of missing images. By missing I mean that url for the image is returning 404. If applicable, which variants of Embla Carousel are relevant to this question?
Additional informationNo response CodeSandbox exampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
@s-peryt thanks for your question. I don’t understand the question because Embla doesn’t interfere with your markup? It lets you choose whatever HTML you want. Have you read the docs? Just put anything you want, images or anything else inside the slide elements (with the class embla__slide in this example): <script>
import emblaCarouselSvelte from 'embla-carousel-svelte'
</script>
<div class="embla" use:emblaCarouselSvelte>
<div class="embla__container">
<div class="embla__slide">Slide 1</div>
<div class="embla__slide">Slide 2</div>
<div class="embla__slide">Slide 3</div>
</div>
</div> |
Beta Was this translation helpful? Give feedback.
-
Oh, I see my mistake. Sorry for that. Of course - I can just operate on individual images inside embla. I must have short brain freeze reading my code. Thanks for pointing that out. |
Beta Was this translation helpful? Give feedback.
@s-peryt thanks for your question. I don’t understand the question because Embla doesn’t interfere with your markup? It lets you choose whatever HTML you want. Have you read the docs?
Just put anything you want, images or anything else inside the slide elements (with the class embla__slide in this example):