Tldraw/apps/docs/content/docs/assets.mdx

27 wiersze
1.1 KiB
Markdown

---
title: Assets
status: published
author: steveruizok
date: 6/9/2023
order: 3
keywords:
- image
- video
- file
- images
- videos
- files
---
Assets are dynamic records that store data about a shared asset. For example, our image and video shapes refer to assets rather than embedding their source files directly. This is essential because, by default, these asset sources are stored in base64 data.
You can use assets for any shared piece of information, however they're best used for images, videos, and files.
## Examples
While we're working on docs for this part of the project, please refer to the examples below:
- [Using images hosted](https://github.com/tldraw/tldraw/blob/main/apps/examples/src/examples/hosted-images/HostedImagesExample.tsx)
- [Customizing the default asset options](https://github.com/tldraw/tldraw/blob/main/apps/examples/src/examples/asset-props/AssetPropsExample.tsx)
- [Handling pasted / dropped external content](https://github.com/tldraw/tldraw/blob/main/apps/examples/src/examples/external-content-sources/ExternalContentSourcesExample.tsx)