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

[bug] Image is not lazy loaded when having lazy in img loading attribute #10120

Open
zluo01 opened this issue Jun 25, 2024 · 0 comments
Open
Labels
status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@zluo01
Copy link

zluo01 commented Jun 25, 2024

Describe the bug

Follow up on this #9825 as there is no response to it.

Reproduction

clone repo: https://github.com/zluo01/tauri-lazy-image-load

When run npm run dev and open in either chrome or firefox and enable disable cache in console, there should be only subset of image is loaded including when refreshing the page. And when scrolling down, console will show more requests being made.

Screenshot_20240625_011228

Screenshot_20240625_011242

However, in tauri, all images are loaded.

Screenshot_20240625_011715

Expected behavior

Images should be lazy loaded when having loading=lazy attribute

Full tauri info output

[✔] Environment
    - OS: Fedora 40 X64
    ✔ webkit2gtk-4.0: 2.44.1
    ✔ rsvg2: 2.57.1
    ✔ rustc: 1.79.0 (129f3b996 2024-06-10)
    ✔ cargo: 1.79.0 (ffa9cf99a 2024-06-03)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (default)
    - node: 21.0.0
    - yarn: 1.22.22
    - npm: 10.2.0

[-] Packages
    - tauri [RUST]: 1.6.8
    - tauri-build [RUST]: 1.5.2
    - wry [RUST]: 0.24.10
    - tao [RUST]: 0.16.9
    - @tauri-apps/api [NPM]: 1.5.6
    - @tauri-apps/cli [NPM]: 1.5.14

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../dist
    - devPath: http:https://localhost:1420/
    - framework: React
    - bundler: Vite

Stack trace

No response

Additional context

No response

@zluo01 zluo01 added status: needs triage This issue needs to triage, applied to new issues type: bug labels Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
None yet
Development

No branches or pull requests

1 participant