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.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →#1 Best Overall
- 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.
Rank #2
- 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
- Open System Properties and choose Environment Variables.
- Edit Path under User variables for one account, or under System variables for all accounts.
- Add the directory containing
wkhtmltoimage.exe, for exampleC:Program Fileswkhtmltopdfbin. - Confirm every dialog, close existing Command Prompt, PowerShell, IDE, worker, or service processes, and start them again.
- Run
where wkhtmltoimagefollowed bywkhtmltoimage --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.
Rank #3
- 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:
--helpand--extended-helplist available options.--debug-javascriptprints JavaScript debugging output.--log-level <level>changes logging verbosity.--enable-javascriptor--disable-javascriptcontrols script execution.--enable-local-file-accesspermits local resources when required.--allow <path>permits access to a narrowly specified local directory.--load-error-handling abort|skip|ignorechooses 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.
Rank #4
- 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.
Crashes, 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 minuteWindows 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 reinstallBest Value
- 【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.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
--allowdirectories. - 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.
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.
whichorwherereturns the intended executable.wkhtmltoimage --versionsucceeds 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.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsQuick 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.

