Skip to main content

Module images

Module images 

Source
Expand description

Content-addressed image store: <cache dir>/images/ab/cd/<sha256>.<ext> (files 0600, dirs 0700), indexed in the images table by URL. Several URLs with identical bytes share one file. When the total size of distinct files exceeds [cache] image_max_mb (default 500), the least recently used files are evicted.

Images are fetched (by grabcli_core::cache::CacheHandle::fetch_image) without cookies or any session headers, and only from Grab’s CDN hosts. Originals are stored as-is: Grab mostly serves AVIF/WebP, which the pure-Rust image crate can’t decode (AVIF) or only encode losslessly (WebP), so there is no thumbnailing; width/height are recorded for PNG/JPEG only.