Silver Load Largest Web Image
Pull the Biggest Real Photo Off a Webpage (and Skip the Logos)
- IMAGE
- MASK
The URL Image Loader wants a direct image link. This one is the scrappier cousin: give it a webpage - a blog post, a portfolio, a wiki article - and it finds the biggest content image on the page and downloads it. The workflow it's designed for: page URLs that serve a random featured image (the README literally targets /random/ endpoints), where you can't know the image URL ahead of time. Point it at the page, get a fresh reference photo every run.
How it works
It fetches the page HTML with a browser-ish User-Agent and parses it with BeautifulSoup. Every <img> element gets its size estimated from the width/height attributes, inline CSS, or data-* attributes (the lazy-load fields like data-original-width), and images are ranked by that area. A keyword blacklist - you control it via exclude, and the default is a long list of logo, icon, banner, thumb, advert, sponsor, widget, related and friends, plus sprite and thumbs always - filters out the junk. The node then tries the biggest candidate first, sending a Referer header to get past hotlink protection, verifies the content-type is actually an image, and content-hashes the bytes so it won't hand you the same image twice.
Inputs
- url - the webpage URL, not an image URL.
- exclude - comma-separated keywords. The default is surprisingly good; shorten it if the node is filtering out the image you actually want.
- seed - set above 0 for consistent selection behavior.
- timeout - optional, seconds, default 10.
Outputs
- IMAGE - the downloaded image.
- MASK - a solid 1.0 mask, present for wiring convenience; nothing meaningful in it.
Gotchas
The big honesty note, straight from the README: "Largest" is determined by HTML attributes, not actual download size. If a page lies about its image dimensions, or lazy-loads images with no width/height anywhere, the node can pick the wrong image - or skip the real hero image entirely because it reported zero area. It's a best-effort heuristic, not a guarantee.
Scraping also means you're at the mercy of the site. Cloudflare-fronted pages and aggressive bot-detection will 403 despite the retries (five attempts with backoff), and JavaScript-rendered pages where images only appear after scripts run won't have them in the raw HTML at all - no headless browser here, just the source. And while it politely respects content-type checks and dedup, this is still crawling someone else's site; keep it to pages you're allowed to fetch, don't hammer, and don't be surprised when a site blocks you.
Install
ComfyUI Manager → search "ComfyUI Silver Nodes", or:
cd ComfyUI/custom_nodes
git clone https://github.com/SilverAndJade/comfyui-silver-nodes
Restart after cloning. This is the one node in the pack that genuinely needs a dependency beyond stock ComfyUI: BeautifulSoup for HTML parsing. It's in the pack's requirements.txt; if the node fails on import, run pip install -r requirements.txt in your ComfyUI venv and restart.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| url | STRING | — | |
| exclude | STRING | nav,logo,header,footer,banner,menu,thumbnail,thumb,icon,button,social,share,ad,ads,advert,sponsor,sponsored,widget,related,recommended,popular,trending,static,gif | — |
| seed | INT | 00–4294967295 | — |
| timeoutopt | INT | 101–60 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| MASK | MASK | — |