What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Use chromedp to drive Chrome through the Chrome DevTools Protocol (CDP), capture the page as image bytes, and write those bytes to a file. For a practical container starting point, run the Go program with the chromedp project’s docker.io/chromedp/headless-shell image. The example below captures a full page; choose a different chromedp action if you need one visible element or only the current viewport.
Choose the capture type before writing the code
A screenshot action determines what part of the rendered page you receive. These are not interchangeable:
As an Amazon Associate I earn from qualifying purchases.
| Capture | Chromedp action | Use it for |
|---|---|---|
| One visible element | chromedp.Screenshot(selector, &buf, chromedp.NodeVisible) |
A matching visible node, such as a chart or card. |
| Current viewport | chromedp.CaptureScreenshot(&buf) |
The browser’s current view, rather than content below the fold. |
| Full page | chromedp.FullScreenshot(&buf, quality) |
A capture of the whole page. The API accepts quality from 0 to 100; quality 100 produces PNG, while lower values produce JPEG. |
FullScreenshot overrides device-emulation settings. If your workflow sets emulation or viewport dimensions, do not assume those settings remain in effect for a full-page capture; review chromedp’s device-setting behavior for your chosen flow.
Build a Go screenshot program
This runnable-shaped example navigates to a URL, captures the full page as PNG bytes, and writes page.png. It is based on the upstream chromedp API and screenshot example; the code has not been executed as part of this article, so validate it against the Go and browser versions you deploy.
#1 Best Overall
- Includes Raspberry Pi 5 with 2.4Ghz 64-bit quad-core CPU (8GB RAM)
- Includes 128GB Micro SD Card pre-loaded with 64-bit Raspberry Pi OS, USB MicroSD Card Reader
- CanaKit Turbine Black Case for the Raspberry Pi 5
- CanaKit Low Noise Bearing System Fan
- Mega Heat Sink - Black Anodized
package main
import (
"context"
"fmt"
"os"
"github.com/chromedp/chromedp"
)
func main() {
url := "https://example.com"
ctx, cancel := chromedp.NewContext(context.Background())
defer cancel()
var buf []byte
if err := chromedp.Run(ctx,
chromedp.Navigate(url),
chromedp.FullScreenshot(&buf, 100),
); err != nil {
fmt.Fprintln(os.Stderr, "capture failed:", err)
os.Exit(1)
}
if err := os.WriteFile("page.png", buf, 0o644); err != nil {
fmt.Fprintln(os.Stderr, "write screenshot:", err)
os.Exit(1)
}
}
Initialize the module and fetch the dependency with Go’s module tooling, then build the program for the environment in which it will run. Add application-specific URL validation and error handling before accepting URLs from users. For an element capture, replace the full-page action with a selector action, for example chromedp.Screenshot("#report", &buf, chromedp.NodeVisible). For the viewport, use chromedp.CaptureScreenshot(&buf).
Run Chrome in Docker
chromedp is the Go control layer; Chrome or headless-shell is still the browser runtime. The chromedp project describes docker.io/chromedp/headless-shell as a multi-architecture image made for chromedp, and the package documentation identifies it as a straightforward headless-environment path. Follow the image README’s documented invocation and publish port 9222 when the Go process must connect to its debugging endpoint. Keep that endpoint reachable only to the Go process that needs it; broad exposure of remote debugging is not a safe default.
Rank #2
- Includes Raspberry Pi 5 16GB with 2.4Ghz 64-bit quad-core CPU (16GB RAM)
- Includes 128GB Micro SD Card pre-loaded with 64-bit Raspberry Pi OS, USB MicroSD Card Reader
- CanaKit Turbine Black Case for the Raspberry Pi 5
- CanaKit Low Noise Bearing System Fan
- Mega Heat Sink - Black Anodized
Image tag choice
The image README documents floating stable, beta, and dev channel tags as well as specific version tags. Channel images are pushed daily, so a floating tag can move as the channel updates. Pin a specific version tag when you need the browser version to be explicit and deployments to be reproducible; check the project’s README for currently available tags because version availability changes.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteBrowser lifecycle choices
By default, chromedp creates a context and launches a browser for the task workflow. If Chrome is instead a separately managed, long-running process, chromedp documents RemoteAllocator for connecting to it. In that arrangement, the application depends on the remote browser remaining available for the duration of navigation and capture. A lost browser connection cancels the chromedp context; check errors returned by chromedp.Run rather than assuming a screenshot was produced.
Rank #3
- CanaKit Raspberry Pi 5 Essentials Starter Kit
For a short-lived browser started by the Go program, keep the context alive through capture and file writing, and cancel it when finished. On Linux, chromedp force-kills Chrome child processes it started when the Go program exits. The browser lifecycle differs when connecting to an independently managed process, so manage that service separately.
Handle common Docker and capture failures
- Container exits with
BUS_ADRERR: the headless-shell README recommends trying a larger shared-memory allocation, such as Docker’s--shm-size 2G. Treat this as a conditional fix for that failure, not a universal requirement. - Zombie processes appear: the image README warns this can happen when using the image directly or as a base image. It recommends Docker’s
--initargument so an init process can reap child processes. chromedp.Runreturns an error: inspect whether navigation or capture failed, and whether the browser connection was closed or killed. Chromedp cancels its context when the browser connection is lost.- The output is empty or not the intended image: confirm that navigation and the screenshot action both completed without error, that the selected CSS element exists and is visible when using selector capture, and that the program writes the returned byte buffer.
- Viewport or device emulation differs in a full-page capture:
FullScreenshotoverrides device-emulation settings. Use a capture action suited to the intended extent and account for that override rather than relying on previously configured emulation.
Or skip the browser setup
ScreenshotNeo provides a website screenshot API and MCP server. One GET request returns an image or PDF, without requiring you to run a browser container for the capture.
Rank #4
- All-in-One Complete Kit: This SANOOV RPi 5 bundle comes with Raspberry Pi 5 4GB RAM single board, active cooler, durable ABS case and screwdriver. No extra parts needed, ready to use right out of the box for beginners and hobbyists
- Powerful Single Board Computer: Equipped with 4GB RAM and high-performance processor, delivers fast running speed for 4K playback, AI projects, programming and daily computing tasks. SANOOV for raspberry pi 5 4GB is equipped with broadcom 64 quad-core Arm Cortex A76 processor with gigabit ethernet and upgraded with IEEE 802.11ac Wi-Fi, Bluetooth 5.0 dual-band 2.4Ghz and 5Ghz and Power Over Ethernet (POE). Upgrading delivers 2-3 x speed vs Pi 4, redefining the experience
- Efficient Active Cooler: Effectively lowers operating temperature and prevents performance throttling. Runs quietly even under long-time heavy load, ensures stable operation all day long. SANOOV RPi 5 4GB kit offer an active cooler, which combines an aluminium heatsink with a high-performance PWM fan. Active cooler is fully compatible with the Pi OS, which can effectively reduce the temperature of RPi5 and ensure its good performance during long-term high load operation
- Sturdy ABS Protective Case: Well-fitted for Raspberry Pi 5 board, can be secured with 4 screws to effectively protect the Pi 5 motherboard from damage, reserves full access to all ports and buttons. SANOOV uses ABS material to produce the case, which has a softer texture and feel. Meanwhile, SANOOV case adopts a layered design for easy disassembly and installation. (Tip: The Case cannot install M.2 HAT Add on Board and Solid State Drive!)
- Wide Application & Full Compatibility: Seamlessly compatible with official OS and mainstream peripheral accessories for Raspberry Pi 5. Whether you are a beginner, student, electronics hobbyist or professional developer, this all-in-one kit meets your diverse needs. It excels in IoT projects, robotics design, retro gaming devices, home media servers and other DIY creations. Backed by a large global community, you can easily find guides, technical support and shared projects online
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
See the ScreenshotNeo API documentation for request options. Cookie and consent banners, newsletter popups, and chat widgets are removed before capture; bot checks, blank pages, failed loads, timeouts, and cache hits are not billed. Its MCP server gives AI agents screenshot tools. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 screenshots.
Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Frequently Asked Questions
Does chromedp itself render the page?
No. Chromedp controls Chrome through CDP; Chrome or headless-shell performs the rendering.
Best Value
- 【What you Get】You will get 1*Pi 5 8GB Single Board,1*RasTech Case,1*Active Cooler,1*Screwdriver,1*Installation instructions,12-month free warranty, lifetime service, 24-hour prompt and friendly response.
- 【More Connectors】There are two USB 3.0 ports(5Gbps simultaneously) and two USB 2.0 ports, which triple total bandwidth ,support any combination of up to two cameras or displays. Peak SD card performance is doubled through support for the SDR104 high-speed mode. It provides a smooth desktop experience for you. Offer Gigabit Ethernet and a PCIe interface, along with dual-band Wi-Fi and Bluetooth 5.0/BLE wireless capability. The RasTech Pi 5 Kit use the new 27W 5.1V 5A USB-C power connector.
- 【 Support Dual 4Kp60 Display 】Each of the two microHDMI sockets can control a 4K display at 60 Hertz, now support HDR, offering super HD video for media streaming projects. RPi 5 is the first RPi model that comes with a PCI Express port (PCIe 2.0 x1 with 500 MB/s) to attach SSDs (requires separate M.2 HAT).
- 【 Excellent Chips And Applications】Pi 5 is a full-size Pi computer using silicon built in-house at Pi. The RP1 “southbridge” provides the bulk of the I/O capabilities for Pi 5. Pi 5 is more friendly and convenient in the development of Internet of Things, Web development, machine identification, automatic control and other electronic equipment applications and network.
- 【 Faster CPU, Better GPU 】 Pi 5 features a Broadcom BCM2712 64-bit quad-core Arm Cortex-A76 processor running at 2.4GHz, it delivers a 2–3× increase in CPU performance relative to RaspberryPi 4. The 800MHz VideoCore VII GPU is compatible to OpenGL ES 3.1 and Vulkan 1.2, substantial uplift in graphics performance. Pi 5 Offers lightning-fast CPU speed, a PCI Express interface, a Real Time Clock (RTC) and a power button and runs significantly cooler than Pi 4.
Can I save a JPEG instead of a PNG?
With FullScreenshot, the chromedp API documents quality 100 as PNG and lower quality values as JPEG.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Recommended Free Tools




