Skip to main content
read_images reads image files and returns one row per image. Each row has the encoded bytes in image, plus the format, dimensions, and file size.

Signature

Supported extensions: .jpg, .jpeg, .png, .webp, .gif, .bmp, .tif, and .tiff.

Example

Columns

A file whose header can’t be read still returns a row, with its bytes and an error in metadata. Files larger than CHOWDER_MAX_FILE_MB (500 MB by default) are skipped with a warning and produce no rows. A remote server can set its own limit. See Configuration.

Use images with infer and embed

Execution

  • Queries that select only source and size_bytes, including count(*), list files without reading them.
  • size_bytes filters skip files before they’re read.
  • format, width, and height come from the image header, without decoding pixels.
  • LIMIT stops reading files once the query has enough rows.