sdsykes/fastimage
63.4
Adequate · 19 September 2026
1.2k
lines of production code
Ruby
primary language
1
measurement over time
What this system is
FastImage is a lightweight Ruby library designed to efficiently determine image dimensions and type by fetching only the necessary header bytes from URIs, local files, or IO objects. It supports a wide variety of modern and legacy formats, including AVIF, HEIC, WebP, and SVG, while correctly handling EXIF orientation data. The system employs a modular parser architecture with lazy data fetching to minimize network traffic and memory usage.
Features
Initial release of FastImage library
Introduces the FastImage gem, a lightweight Ruby library for determining image size and type by fetching only the necessary header bytes from a URI, local file path, or IO object. The library supports a wide range of formats including GIF, JPEG, BMP, TIFF, ICO, PNG, HEIC/HEIF, AVIF, PSD, SVG, WEBP, and JXL, and can parse Exif orientation data for JPEGs and TIFFs. It handles HTTP redirects (up to 4), allows custom HTTP headers, and includes a compatibility patch for Ruby versions older than 2.2 to support hostnames with underscores.
lib · high confidence
Behavioural changes
Complete rewrite of image parsing engine with new format support
The image parsing logic in lib/fastimage/fastimage\_parsing has been completely refactored into a new modular architecture. This change introduces dedicated parsers for AVIF, HEIC, JXL, and WebP, alongside updated parsers for BMP, GIF, JPEG, PNG, PSD, SVG, and TIFF. The new system utilizes a Fiber-based stream abstraction (FiberStream) for efficient lazy data fetching and includes a robust ISO BMFF parser to handle complex container formats like HEIC and AVIF. Additionally, the parsers now correctly handle EXIF orientation data for JPEG and TIFF images, ensuring dimensions are reported accurately regardless of rotation.
_lib/fastimage/fastimage\parsing · high confidence
FastImage library refactored with modular parsers and new version 2.4.1
The FastImage library has been restructured to use a modular parser architecture, introducing separate files for handling specific image formats (AVIF, BMP, EXIF, GIF, HEIC, ICO, ISO BMFF, JPEG, JXL, JXLC, PNG, PSD, SVG, TIFF, WebP) and stream utilities, while the main class now includes these parsers via a module. This change coincides with a version bump to 2.4.1, as defined in the new version.rb file. The core API methods (size, type, animated?) remain available, but the internal implementation now relies on this new parser registry and lazy property fetching structure.
lib/fastimage · high confidence
Test coverage
1 commit adding/updating tests in test/fixtures/exif-orientation-testimages; 2 commits adding/updating tests in test/fixtures/avif; Add test infrastructure for SSL and slow-network scenarios; Added SVG and XML test fixtures.
Dependencies
Initial gemspec and Gemfile setup for FastImage
The project now includes a Gemfile and a gemspec file that define the FastImage gem structure. The gemspec specifies a minimum Ruby version of 1.9.2 and lists development dependencies including fakeweb-fi (\~\> 1.3), rake (\>= 10.5), rdoc, test-unit, and webrick. This establishes the build and testing environment for the library.
(dependencies) · high confidence
Housekeeping
Initial repository setup with documentation and build configuration
The repository is initialized with core project files including a comprehensive README.md detailing the FastImage gem's capabilities (fetching image size/type with minimal network traffic), a CHANGELOG tracking versions up to 2.4.1, an MIT license, and a Rakefile for running tests and generating RDoc documentation. A .gitignore file is added to exclude build artifacts (pkg/), lockfiles (Gemfile.lock), and OS-specific files (.DS\_Store).
(repo-wide) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 63.
Lenses
- Code Health 96
- Architecture 69
- Maturity 54
- Readiness 62
- Security 99
Changes since last survey
- 300 commits — 250 feature/other, 50 fixes
By area
- (root) — 117 commits
- lib/fastimage.rb — 77 commits
- (repo) — 65 commits
- test/fixtures — 18 commits
- test/test.rb — 9 commits
- .github/workflows — 7 commits
- lib/fastimage — 7 commits
Notable commits
- fix: Add fix for data uri content length
- fix: Add objC port, fixes #60
- fix: Add skip mechanism, to not read skipped bytes into memory. Fixes #70
- fix: Adds test2.bmp to included files in gem. Fixes #34
- fix: Avoid detecting CR2 and CRW as tiff. Use own fakeweb. Fixes #104
- fix: Documentation and example fixes for ico format
- fix: Fix GIF global color table flag check
- fix: Fix Gemfile.lock for v1.6.7
- fix: Fix HTML with inline SVG being incorrectly detected as SVG
- fix: Fix compat with 1.8.7
- fix: Fix content_length for data uris, add test
- fix: Fix file names
- fix: Fix handling of redirect response without Location header
- fix: Fix maintainer
- fix: Fix missing end
- fix: Fix missing stringio require
- fix: Fix parsing for svg with longer preamble
- fix: Fix protocol relative redirects, make new URI object if needed
- fix: Fix readme badges
- fix: Fix returning nil if image type not gif for animated
- …and 280 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
sdsykes/fastimage was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 19 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 7a0dcf780e6d8cd7686520a3a1f57e7cd85b0b46 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-b51f968c9b10.