Wkhtmltoimage is a headless command-line utility that renders an HTML file or web page into an image using the Qt WebKit engine. A basic conversion is one command, while options control format, JPEG quality, JavaScript, viewport size, cropping, authentication, and when rendering should finish. The upstream GitHub repository is archived and read-only as of January 2, 2023, so test it against your pages before relying on it for a new production workflow.
What wkhtmltoimage does
The wkhtmltopdf project documentation describes wkhtmltoimage as an open-source (LGPLv3) command-line tool that renders HTML into image formats with Qt WebKit. It is not a desktop browser and does not capture a physical screen. You provide an input URL or HTML file and an output filename; the renderer loads the page and writes an image.
The documented command shape is:
wkhtmltoimage [OPTIONS]... <input file> <output file>
For example, this saves a page as a PNG:
wkhtmltoimage https://example.com example.png
Use the project overview at wkhtmltopdf.org for the upstream description and links to documentation.
Install and verify the command
Install wkhtmltoimage using the package supplied for your operating system or distribution, then verify that the executable is on your PATH:
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
wkhtmltoimage --version
The exact package name and build can differ by operating system. Check the package documentation for your platform rather than assuming that every distribution ships the same build or patches. The Debian command reference is available in the Debian unstable wkhtmltoimage manual.
Basic wkhtmltoimage examples
Render a URL to PNG
wkhtmltoimage https://example.com example.png
PNG is useful when you need lossless text and interface graphics. The output extension normally indicates the intended format, but you can select it explicitly with --format.
Render a local HTML file
wkhtmltoimage ./report.html report.png
For local pages that reference other local files, use the file URL form when required by your build:
wkhtmltoimage file:///absolute/path/report.html report.png
Local-file access and external assets can be restricted by the particular package build, so check the command output if stylesheets, fonts, or images are missing.
Recommended Free Tools
Select an output format
wkhtmltoimage --format png https://example.com example.png wkhtmltoimage --format jpg https://example.com example.jpg wkhtmltoimage --format webp https://example.com example.webp
The manual documents format selection through --format. Use the format supported by your installed build and downstream image pipeline.
Set JPEG quality
wkhtmltoimage --format jpg --quality 85 https://example.com example.jpg
--quality is documented for JPEG values from 0 through 100. Higher values generally preserve more detail while producing larger files; choose a value after checking text and image artifacts in your own output.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Control the rendered viewport
Set width and height
wkhtmltoimage --width 1440 --height 900 https://example.com desktop.png
--width and --height set the viewport dimensions used while rendering. The manual describes width as a guide unless smart width is disabled, so a page may not behave like a fixed desktop browser unless you also account for its layout rules.
Crop a region
wkhtmltoimage --crop-x 100 --crop-y 200 --crop-w 800 --crop-h 600 https://example.com panel.png
The crop controls specify the starting coordinates and dimensions of the output region. Coordinates are measured from the rendered page’s top-left corner. If the result is blank or clipped, first capture without cropping and then adjust the coordinates to the actual layout.
Capture a full page
Wkhtmltoimage renders a page image rather than a browser window. Page height depends on the document and the selected viewport. Long, dynamically expanding pages can be difficult to make deterministic; wait for the page to finish changing before relying on a full-page result.
JavaScript and page readiness
Allow or disable JavaScript
JavaScript is enabled by default in normal usage. Disable it when scripts cause an unwanted redirect, animation, resource loop, or inconsistent output:
wkhtmltoimage --disable-javascript https://example.com static.png
Disabling JavaScript also removes content that the page creates only after script execution, so use it as a diagnostic or when a static render is intentional.
Wait for a status value
For pages that signal readiness through window.status, use --window-status:
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
wkhtmltoimage --window-status ready https://example.com dashboard.png
Your page must set the value, for example:
<script> // Set this after data and charts are ready. window.status = 'ready'; </script>
This is different from an arbitrary sleep: the renderer waits for the page’s status value. It will not automatically understand every modern framework’s network-idle or hydration state.
Authenticated and network-dependent pages
The manual includes controls for cookies, custom headers, authentication, proxies, and SSL client certificates. These can help with pages that require request metadata, but they do not guarantee that a modern login flow, anti-bot challenge, or browser API will work in Qt WebKit.
Typical request controls
- Use documented cookie and header options for session values or API headers.
- Use authentication options only for the authentication scheme your endpoint accepts.
- Configure proxy settings when the page is reachable only through a proxy.
- Provide SSL client-certificate options when the server requires mutual TLS.
Keep credentials out of shell history and CI logs. Prefer environment variables or a protected secret store, and avoid embedding long-lived tokens in source files.
A practical shell workflow
- Check the executable with
wkhtmltoimage --version. - Start with a simple URL and output file.
- Add
--widthand--heightto reproduce the intended viewport. - Choose
--formatand, for JPEG,--quality. - If content is missing, test JavaScript, assets, cookies, headers, and readiness separately.
- Only then add crop coordinates or integrate the command into a job.
Example script:
#!/usr/bin/env bash
set -euo pipefail
url="${1:?usage: $0 URL OUTPUT}"
out="${2:?usage: $0 URL OUTPUT}"
wkhtmltoimage --width 1366 --height 900 --format png "$url" "$out"
printf 'Wrote %sn' "$out"
Troubleshooting wkhtmltoimage
Command not found
The executable is not installed or is outside PATH. Install a package for your operating system, then run wkhtmltoimage --version using its full path if necessary.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchBlank or partially loaded output
Check the command’s diagnostic output, confirm the URL is reachable from the machine, and verify that CSS, fonts, and images are not blocked. Try enabling JavaScript (if you disabled it), then add a page-controlled window.status value. A page that depends on browser features unavailable to Qt WebKit may still fail.
Images or styles are missing
Inspect asset URLs for relative-path mistakes, HTTPS certificate problems, authentication requirements, or local-file restrictions. Test the asset URL from the same host and account that runs wkhtmltoimage.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Layout is too wide or clipped
Set an explicit viewport width, remove cropping, and capture again. Responsive CSS may select a different breakpoint than your browser; adjust --width before changing crop values.
Dynamic content is captured too early
Use a page readiness marker with --window-status. If you cannot change the page, simplify the page or use a renderer whose waiting controls match its application. Do not assume a fixed delay handles every asynchronous request.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteModern sites fail despite valid HTML
Wkhtmltoimage uses Qt WebKit, not a current Chromium engine. ES features, complex CSS, Web Components, service workers, and anti-bot flows may not behave as they do in current browsers. Treat compatibility as a page-by-page test requirement.
Maintenance and suitability today
The upstream wkhtmltopdf repository is archived by its owner and read-only; the archive date shown by GitHub is January 2, 2023. That establishes the upstream repository’s status, not the status of every downstream fork or operating-system package. The available evidence does not establish a current release schedule, security-support policy, or complete platform compatibility matrix.
Wkhtmltoimage remains a reasonable fit when you need a scriptable utility, Qt WebKit rendering, and documented image controls. Reconsider it when your target pages require current browser JavaScript or CSS, frequent upstream maintenance, or browser-accurate behavior. Evaluate any replacement on rendering-engine currency, output and quality controls, viewport and crop support, operating-system coverage, and maintenance status.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server for developers. One GET request returns a PNG, JPEG, WebP, or PDF. Before capture it accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers report the page verdict and billing status.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Use the same call from a shell (see the ScreenshotNeo API documentation):
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Python:
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
ScreenshotNeo also provides an MCP server with take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients. It includes full-page and selector capture, device presets and custom viewports, dark mode, retina scale, custom CSS and JavaScript, clicks, waits, request blocking, headers, cookies, user agents, timezone and geolocation, transparent backgrounds, resizing, TTL caching, signed links, asynchronous webhooks, bulk capture of up to 100 URLs per call, a usage API, and an OpenAPI specification. Its parameter names are compatible with those used by other screenshot APIs.
The Free plan includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 shots; every feature is available on every plan. Create a free ScreenshotNeo account to try it without a card.
Frequently Asked Questions
Does wkhtmltoimage require a graphical desktop session?
It is documented as a headless command-line tool, so it is designed to run without opening a visible browser window.
Can wkhtmltoimage save PDF files?
Wkhtmltoimage is the image renderer; the related wkhtmltopdf command handles PDF output.
Is the archived repository proof that every wkhtmltoimage package is abandoned?
No. It proves that the upstream GitHub repository is read-only and was archived on January 2, 2023. Forks and distribution packages can have separate maintenance histories.
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.

