Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If wkhtmltoimage --version works in the same environment as your application, the executable is installed and discoverable. If it does not, locate the binary, add its containing directory to PATH, restart the process that runs your code, and test again. When a wrapper such as IMGKit still cannot find it, pass the executable’s absolute path instead of relying on environment lookup.

What wkhtmltoimage needs

wkhtmltoimage is the command-line HTML-to-image converter in the wkhtmltopdf project. Its documented invocation is:

wkhtmltoimage [OPTIONS]... <input file> <output file>

The stable project series is 0.12.6, released June 11, 2020. Install a package or platform installer first; setting PATH cannot fix a binary that is not installed.

Install the program

The project publishes Windows and macOS installers and distribution-specific Linux packages. Use the package appropriate for your operating system and CPU architecture, then open a new terminal before testing. If you maintain a server or container, install it in that image or host rather than only on your development workstation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Lexar D40E 128GB Dual USB 3.2 Gen 1 Type-C Jump Drive, Champagne Silver
  • USB-C 2-in-1 storage OTG: The Lexar JumpDrive Dual Drive D40E features USB Type-A and Type-C connectors in a slim, portable form factor for easy device compatibility
  • Transfer speeds up to 100MB/s: Based on internal testing, performance may vary depending upon the host device, interface, and usage conditions. 1MB=1,000,000 bytes
  • Plug and Play: Widely compatible with USB Type-C smartphones, tablets, laptops, Macs, and traditional Type-A devices, no software installation required. The 360° swivel design allows for easy switching between connectors without the hassle of losing a cap
  • Durable & Compact: The Lexar D40E USB memory stick features a metal enclosure, withstands temperatures from 0° to 50° C (32°F to 122°F), and is lightweight at 26g with dimensions of 70.4 x 16.9 x 11.7mm
  • Security & Warranty: Securely protects files using an advanced security software solution with 256-bit AES encryption. Backed by a Lexar 3-year limited warranty

Verify whether the command is discoverable

Linux and macOS

Run:

which wkhtmltoimage
wkhtmltoimage --version

which prints the executable selected from the current shell’s PATH. A successful version command prints the installed version. If which prints nothing or the shell reports “command not found,” continue by locating the file and adding its directory.

Windows

In Command Prompt or PowerShell, run:

where wkhtmltoimage
wkhtmltoimage --version

The result should be a path such as C:Program Fileswkhtmltopdfbinwkhtmltoimage.exe. If where cannot find it, search the folder selected by the installer and confirm that wkhtmltoimage.exe exists.

Add the binary directory to PATH

Linux and macOS for the current shell

Add the directory, not the executable itself. For example:

export PATH="/opt/wkhtmltox/bin:$PATH"
which wkhtmltoimage
wkhtmltoimage --version

Putting the new directory first selects that copy when several versions are installed. Use the actual directory returned by your file search; /opt/wkhtmltox/bin is only an example.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
SANDISK 128GB Ultra Flair, USB-A Flash Drive, Up to 150MB/s Read Speeds
  • High-speed USB 3.0 performance of up to 150MB/s(1) [(1) Write to drive up to 15x faster than standard USB 2.0 drives (4MB/s); varies by drive capacity. Up to 150MB/s read speed. USB 3.0 port required. Based on internal testing; performance may be lower depending on host device, usage conditions, and other factors; 1MB=1,000,000 bytes]
  • Transfer a full-length movie in less than 30 seconds(2) [(2) Based on 1.2GB MPEG-4 video transfer with USB 3.0 host device. Results may vary based on host device, file attributes and other factors]
  • Transfer to drive up to 15 times faster than standard USB 2.0 drives(1)
  • Sleek, durable metal casing
  • Easy-to-use password protection for your private files(3) [(3)Password protection uses 128-bit AES encryption and is supported by Windows 7, Windows 8, Windows 10, and Mac OS X v10.9 plus; Software download required for Mac, visit the SanDisk SecureAccess support page]

Persist PATH for future shells

Add the export line to the startup file used by the account that runs the program, such as ~/.profile, ~/.bashrc, or the appropriate zsh configuration. Then start a new shell, or reload the file:

. ~/.profile
wkhtmltoimage --version

For a service, cron job, IDE, CI runner, virtual-environment launcher, or container, the interactive profile may never be read. Set PATH in that process’s configuration and restart it. A common Unix user-install location is ~/.local/bin; it must likewise be on the service account’s path.

Windows user or system PATH

  1. Open System Properties and choose Environment Variables.
  2. Edit Path under User variables for one account, or under System variables for all accounts.
  3. Add the directory containing wkhtmltoimage.exe, for example C:Program Fileswkhtmltopdfbin.
  4. Confirm every dialog, close existing Command Prompt, PowerShell, IDE, worker, or service processes, and start them again.
  5. Run where wkhtmltoimage followed by wkhtmltoimage --version.

Applications that use the shared library may also need wkhtmltox.dll discoverable on PATH. Ensure the DLL and executable match the host architecture.

Use an absolute path with IMGKit

IMGKit normally expects wkhtmltoimage on PATH. If the shell finds it but your Python process does not, configure the exact executable location:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
2 Pack 64GB USB Flash Drive USB 2.0 Thumb Drives Jump Drive Fold Storage Memory Stick Swivel Design - Black
  • What You Get - 2 pack 64GB genuine USB 2.0 flash drives, 12-month warranty and lifetime friendly customer service
  • Great for All Ages and Purposes – the thumb drives are suitable for storing digital data for school, business or daily usage. Apply to data storage of music, photos, movies and other files
  • Easy to Use - Plug and play USB memory stick, no need to install any software. Support Windows 7 / 8 / 10 / Vista / XP / Unix / 2000 / ME / NT Linux and Mac OS, compatible with USB 2.0 and 1.1 ports
  • Convenient Design - 360°metal swivel cap with matt surface and ring designed zip drive can protect USB connector, avoid to leave your fingerprint and easily attach to your key chain to avoid from losing and for easy carrying
  • Brand Yourself - Brand the flash drive with your company's name and provide company's overview, policies, etc. to the newly joined employees or your customers
import imgkit

config = imgkit.config(
    wkhtmltoimage='/opt/bin/wkhtmltoimage',
    xvfb='/opt/bin/xvfb-run'
)
imgkit.from_file('page.html', 'page.png', config=config)

On Windows, replace the Unix path with the full path to wkhtmltoimage.exe. An absolute path is usually the most reliable choice for system services, CI jobs, containers, schedulers, and applications launched from an IDE because it does not depend on inherited shell settings.

Separate a PATH problem from a rendering problem

Run the exact binary returned by which or where:

/opt/bin/wkhtmltoimage --version
/opt/bin/wkhtmltoimage input.html output.png

On Windows, quote paths containing spaces:

"C:Program Fileswkhtmltopdfbinwkhtmltoimage.exe" --version
"C:Program Fileswkhtmltopdfbinwkhtmltoimage.exe" input.html output.png

If the version command fails, investigate installation, permissions, architecture, or dynamic libraries. If it succeeds but conversion fails, executable discovery is working; diagnose the page, resources, JavaScript, or command options instead.

Diagnostic options that identify the failure

The Debian manual documents these switches:

  • --help and --extended-help list available options.
  • --debug-javascript prints JavaScript debugging output.
  • --log-level <level> changes logging verbosity.
  • --enable-javascript or --disable-javascript controls script execution.
  • --enable-local-file-access permits local resources when required.
  • --allow <path> permits access to a narrowly specified local directory.
  • --load-error-handling abort|skip|ignore chooses what to do when a page load fails.

For content that appears only after scripts run, keep JavaScript enabled and add an appropriate --javascript-delay. Use the smallest delay that consistently allows the page to finish; a delay cannot repair a missing network resource or a script error.

Common errors and fixes

“command not found” or “No wkhtmltoimage executable found”

The failing process cannot see the directory. Run which wkhtmltoimage or where wkhtmltoimage in the relevant environment, add that directory to PATH, restart the process, or configure IMGKit with an absolute path.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
SIMMAX 32GB Memory Stick USB 2.0 Flash Drives Swivel Thumb Drive Pen Drive (32GB Purple)
  • GOOD VALUE PACKAGE - 1 Pack 32GB Memory Stick USB 2.0 Flash Drives with great cost performance and high quality.
  • BIG CAPACITY - The available capacity: 29.10GB-29.8GB, You can save the data of movies, music, photos, designs, programs, manuals, handouts in a high speed.Good performance in digital data storing, transferring and sharing with families, friends, workmates, clients and machines.
  • EASY TO USE & PLUG AND WORK - Support windows 7 / 8 / 10 / Vista / XP / 2000 / ME / NT Linux and Mac OS, Compatible with USB2.0 and below.
  • TWISTTURN DESIGN & EASY CARRY - The metal clip rotates 360° round the ABS plastic body which with rubber oil skin feeling finish. The capless design can avoid lossing of cap, and providing efficient protection to the USB port.
  • WARRANTY & SUPPORT - SIMMAX logo is laser printed on the USB connector surface, our products are of good quality and we promise that any problem about the product within one year since you buy.

It works in a terminal but not in an IDE, worker, or service

Those processes inherit a different environment. Print or inspect the process’s PATH, set it in the service or runner configuration, and restart the process. For production code, an explicit executable path avoids profile-loading differences.

The binary is found but will not start

Check Unix execute permissions and the presence of required shared libraries. On Windows, verify that the executable and wkhtmltox.dll match the operating system architecture and that the DLL directory is discoverable. Run the absolute --version command to capture the operating system’s precise loader error.

Local images, stylesheets, or fonts are missing

Local-file access may be restricted. If the page legitimately needs local resources, use --enable-local-file-access and, preferably, --allow /specific/resource/directory rather than granting broad filesystem access. Confirm that URLs and file permissions are correct.

JavaScript content is incomplete

Use --debug-javascript, verify that JavaScript is enabled, and add --javascript-delay for content that appears asynchronously. Check the diagnostic output for script exceptions and failed network requests.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
IMEASON Swivel Design 16GB USB Flash Drive with Keychain, USB 2.0 Portable Thumb Drive Memory Stick, FAT32 Format Flashdrive for Data Storage, Photos, Music, Files (Black, 16 GB)
  • 【16GB Flash Drive】USB flash drives with 16GB capacity, meet your needs of daily use on work, school, home and travelling for photos, music, videos, files storage and transfer. IMEASON thumb drives can be used to store different files, easy to data backup.
  • 【Metal Swivel Cap Design】USB thumb drive is metal swivel cover provides extra protection for the usb thumbdrive connector, no usb drive cap to lose; keychain design makes it easier to carry without worrying lose it.
  • 【Wide Compatibility】USB drive supports Windows 7/8/10/11 / Vista / XP / Unix / 2000 / ME / NT Linux and Mac OS, also Supports USB 2.0 and 1.1 ports. USB Stick support TV, desktop, notebook computer, car, audio and other device. The USB Memory Stick is your great data storage and transfer companion with traveling and working.
  • 【Easy to use】usb memory stick is plug and play without any software installation. Just simply plug the Flashdrive into the port of your USB-compatible devices such as computer, laptop to start data storage or transmission.
  • 【What You Get】16 GB USB Flash Drive Thumb Drive, The default format of the usb storage flash drive is FAT32.

The process exits with a segmentation fault

IMGKit notes that some versions can fail this way. Reproduce the command outside the wrapper, capture the log and version, and test with a supported installation or a simpler input. Do not treat a segmentation fault as a PATH issue when the executable has already started.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Security and deployment boundaries

The project download page warns: “Do not use wkhtmltopdf with any untrusted HTML – be sure to sanitize any user-supplied HTML/JS, otherwise it can lead to complete takeover of the server it is running on!” The same risk applies to wkhtmltoimage. Treat HTML, CSS, JavaScript, remote URLs, cookies, and local-file references as untrusted input unless you control them.

  • Sanitize or reject user-supplied HTML and JavaScript.
  • Run the renderer in an isolated account, container, or sandbox where practical.
  • Grant only the required --allow directories.
  • Avoid exposing credentials, private files, or unrestricted network access to rendered pages.
  • Pin and update the installed package through your normal operating-system process.

PATH versus an explicit path: choosing an approach

Approach Best use Trade-off
Global or service PATH Several applications share one centrally managed installation. Every process must inherit the correct environment; upgrades can change which binary is selected.
Absolute application path IMGKit, CI, containers, schedulers, and services need predictable behavior. The path must be updated when the binary is moved or replaced.
Bundled or pinned binary Reproducible builds and controlled deployments. You own packaging, security updates, and platform-specific maintenance.

Or skip the browser setup

For a hosted screenshot instead of maintaining a local renderer, ScreenshotNeo returns a PNG, JPEG, WebP, or PDF from one request. Its cleanup step accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each cleanup step can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing result.

Use the API documentation at https://screenshotneo.com/docs/ for all options, including full-page lazy-image loading, CSS-selector element capture, dark mode, device presets, arbitrary viewports, retina scale, PDF paper settings and page ranges, custom CSS or JavaScript, clicks, waits, request blocking, headers, cookies, user agents, authorization, timezone, geolocation, transparent backgrounds, resizing, chosen cache TTLs, signed image links, asynchronous webhooks, bulk capture of up to 100 URLs per call, usage data, and the OpenAPI specification.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

cURL

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}`);

An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. The Free plan includes 1,000 shots per month without a card; paid plans start at $5 for 3,000 shots. Sign up for the free ScreenshotNeo plan.

Final verification checklist

  • The package or installer matches your operating system and architecture.
  • which or where returns the intended executable.
  • wkhtmltoimage --version succeeds in the same environment as the application.
  • The shell, IDE, worker, service, or container was restarted after changing PATH.
  • IMGKit has an absolute path when environment inheritance is uncertain.
  • The absolute command works before wrapper options are investigated.
  • Local-file permissions, JavaScript timing, and resource errors are tested separately.
  • Untrusted HTML and JavaScript are sanitized and rendered with least privilege.

Frequently Asked Questions

Can I put the wkhtmltoimage executable itself in PATH?

No. PATH entries are directories. Add the directory that contains the executable, then restart the process that needs to discover it.

Why does changing .bashrc not fix a systemd service?

A service normally does not read your interactive shell startup files. Define PATH in the service or deployment configuration and restart the service.

Should I use –allow or –enable-local-file-access?

Prefer –allow with the narrow directory the page needs. Use broader local-file access only when the input requires it and the security boundary is understood.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.