csv_preview is a Ruby gem that renders CSV and TSV files as preview images (PNG, JPEG or WebP) and adds an Active Storage previewer to Rails. It turns the first rows of a file into a clean, readable table image: a thumbnail for a file list or a larger preview for a detail page. In Rails, CsvPreview::ActiveStoragePreviewer (an ActiveStorage::Previewer) makes CSV attachments work with blob.preview, blob.representation and previewable? the same way PDFs and videos do. It draws text with libvips (vips) and Pango, needs no LibreOffice, headless browser or ImageMagick, never starts another process or opens a network connection, and treats every file as untrusted input with bounded reads, memory and time.
Required Ruby Version
>= 3.3
Authors
Gary Tou
Versions
-
0.1.0
-
source
- 0.1.0 source November 17, 2026 (458 KB)
-
Requirements
libvips 8.12 or newer with Pango text support
Pushed by
SHA 256 checksum
Provenance
Source Commit
Build File