slidev-addon-preload-images
v0.2.0
Published
Slidev addon for automatic image preloading - smoother slide transitions
Maintainers
Readme
slidev-addon-preload-images
Preloads images in your Slidev presentation so slides don't flicker on transition.
Setup
npm install slidev-addon-preload-images# slides.md
---
addons:
- slidev-addon-preload-images
---That's it. Images from markdown, HTML, CSS url(), and frontmatter (image, background, etc.) are picked up automatically.
How it works
- On load: preloads all images in the deck in parallel
- On navigation: ensures upcoming slides are ready
With ahead > 0, preloads a bidirectional window around the current slide first, then the rest sequentially.
Config
Optional, in frontmatter:
preloadImages:
enabled: false # disable (default: true)
ahead: 5 # bidirectional window size (default: 0 = all at once)Debug
In dev mode, check the console:
[preload-images] Found 25 images in 40 slides
[preload-images] All slides preloadedLicense
MIT
