Skip to content

Lazy loading does not work with dynamic image URLs #93

@altrusl

Description

@altrusl

Checks

Version

0.6.12

Description

When i use dynamic images in Vue 3 / Vite project

<Splide :options="spliderOptions" aria-label="Providers">
    <SplideSlide v-for="provider in casinoStore.providers.value" :key="provider.id">
      <div class="provider" :title="provider.name" @click="filterByProvider(provider)">
        <img
          :data-splide-lazy="`/assets/images/providers/${provider.slug}.png`"
          class="image"
        >
      </div>
    </SplideSlide>
  </Splide>

all data-splide-lazy attributes are converted to src on the mount

With

data-splide-lazy="/assets/images/providers/someImg.png"

lazy-loading works fine

Reproduction Link

No response

Steps to Reproduce

  1. Use the code abouve with binding of image url's...

Expected Behaviour

Lazy loading should work with binded data-splide-lazy attribute

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions