Skip to content

Image not loading if it is the first in-view element #154

@lileeDev

Description

@lileeDev

First of all, thank you for such good work. Appreciate it !

I am new to Svelte. Recently I am using Svelte and svelte-image to build a website. I have a hero banner and a custom scroller implemented. I keep all the default settings with svelte-image. The image in the hero banner is not loading at first. After I scroll down and scroll up, it finally loads and displays properly.

Since there are other setups in my project, I can't duplicate an exact example. But I created a similar one, please see below.
https://svelte.dev/repl/c8006d110c1b42979a5de14680734c98?version=3.49.0

You may see that the image in the first section is with lazy={false} and it is perfectly loaded as expected. But the image in section 4 with default settings is not being loaded (even it is scrolled completely). You may also try to twist the lazy setting in section 1 for testing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions