lance-format / lance-format/lance-data-viewer
feat: configurable asset preview for columns referencing external URLs/paths
@gordonmurray is already working on this.
Since Apr 6, 2026.
- Dominant language
- Python
- Stars
- 60
- Forks
- 9
- Avg merge
- 10m
- Merged PRs (30d)
- 4
Description
Lance tables often contain references to external assets (image paths, S3 keys, document URLs), but the viewer displays them as plain text. Adding inline previews would make the viewer much more useful for ML/CV workflows where datasets reference images or documents.
Proposed approach: URL template via environment variables
PREVIEW_URL_TEMPLATE=http://minio:9000/my-bucket/{image_key}
PREVIEW_COLUMNS=image_key
PREVIEW_TYPE=image # image | link | iframe
The viewer constructs URLs at render time by substituting {column_name} placeholders with row values, then renders an <img>, <a>, or <iframe> tag.
Why a URL template (not S3 integration):
- Works with any HTTP-accessible storage (MinIO, Nginx, CDN, pre-signed URLs)
- No credentials or SDK dependencies in the viewer
- The viewer stays read-only and stateless
- Extensible to documents, audio, video by changing
PREVIEW_TYPE
Implementation outline:
- Backend: 3 env vars + a
/configendpoint so the frontend knows the preview settings - Frontend: cell renderer checks if column is in
preview_columns, constructs URL, renders preview element withloading="lazy"and thumbnail CSS
This is the largest proposed change so I wanted to get input on the approach before implementing.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.