feat: expose extracted images in scrape response#322
Merged
Conversation
Add an `images` output format so consumers get discovered images as
structured data instead of re-parsing the HTML. The native /v1 surface
returns `[{url, alt}]` objects; /v2 and /firecrawl/v2 flatten them to a
plain string[] of URLs to stay a Firecrawl drop-in.
Extraction mirrors Firecrawl's source set (img src/data-src/srcset,
picture source, og/twitter/itemprop meta, icon links, video poster,
inline background-image) with WHATWG-correct srcset parsing so a comma
inside a data: URI is not shredded into phantom URLs. Deduplicated by
URL in traversal order; a later duplicate upgrades an empty alt.
Threaded through the CLI (--format images), MCP tool schemas, and the
v2 format decomposition.
Keep the OutputFormat drift-check tables and both SKILL.md copies in sync with the new `images` variant.
us
commented
Jul 18, 2026
us
left a comment
Owner
Author
There was a problem hiding this comment.
All checks green (build/test, clippy, conformance, fuzzing, CodeQL, OpenAPI + docs drift guards). Verified end-to-end on 36 live sites with a Firecrawl-parity oracle (0 divergence) plus adversarial fixtures. Merging.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested in #317 by @Antardas: return discovered images as structured data so consumers don't have to re-parse the HTML for RAG, indexing, media downloading, or recursive crawling.
What
New
imagesoutput format:/v1(native):images: [{ url, alt }]— resolved absolute URLs plus alt text where the source carries it (handy as caption/embedding text for RAG)./v2+/firecrawl/v2:images: string[]— flat URL list, matching Firecrawl'simagesshape so the compat surface stays a drop-in.Sources covered:
<img>src/data-src/srcset,<picture><source>, og/twitter/itemprop meta, icon links,<video poster>, and inlinebackground-image. srcset is parsed per the WHATWG algorithm, so a comma inside adata:URI is kept whole instead of being split into phantom URLs. Deduplicated by URL in traversal order; a later duplicate upgrades an emptyalt.Also threaded through the CLI (
--format images) and the MCP tool schemas.Notes
imagesis only produced when requested, no change to other formats or the scrape-success path./v2stays a byte-compatible Firecrawl drop-in while native/v1adds thealtmetadata.ref #317