lance-format / lance-format/lance-data-viewer

feat: configurable asset preview for columns referencing external URLs/paths

Open
#29 1 comment 0 reactions 1 assignee View on GitHub

@gordonmurray is already working on this.

Since Apr 6, 2026.

enhancement
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 /config endpoint so the frontend knows the preview settings
  • Frontend: cell renderer checks if column is in preview_columns, constructs URL, renders preview element with loading="lazy" and thumbnail CSS

This is the largest proposed change so I wanted to get input on the approach before implementing.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.