Back to Slidev

Bundle Remote Assets

docs/features/bundle-remote-assets.md

52.15.1793 B
Original Source

Bundle Remote Assets

Just like you would do in markdown, you can use images pointing to a remote or local URL.

For remote assets, the built-in vite-plugin-remote-assets will cache them onto the disk at first run, ensuring instant loading even for large images later on.

md
![Remote Image](https://sli.dev/favicon.png)

For local assets, put them into the public folder and reference them with a leading slash (i.e., /pic.png, NOT ./pic.png, which is relative to the working file).

md
![Local Image](/pic.png)

If you want to apply custom sizes or styles, you can convert them to the `` tag:

html