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

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

If JPG files appear in a browser but disappear from a wkhtmltopdf PDF, start by checking the converter’s actual command, the image path, and local-file permissions. wkhtmltopdf 0.12.6 loads images by default, so the usual causes are a hidden --no-images option, a path the conversion process cannot resolve, or the local-file-access policy blocking the asset. A conversion can still report “Done” because media-load errors default to being ignored.

Why wkhtmltopdf can omit a JPG without failing

wkhtmltopdf renders HTML through its own process, not through the browser window where you preview the page. That process may have a different working directory, filesystem permissions, URL base, or security policy. A JPG that is visible during browser preview is therefore not proof that wkhtmltopdf can read it.

The documented 0.12.6 manual lists image loading as enabled by default. The --no-images switch disables it, while --images explicitly enables it. The same manual documents a media-load error policy whose default is ignore; conversion can finish while an image is silently left out. The official downloads page identifies 0.12.6 as the stable series and dates that release to June 11, 2020: wkhtmltopdf downloads.

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.

Use this diagnostic sequence first

  1. Record the environment. Run wkhtmltopdf --version and save the complete output, operating system, architecture, build details if shown, exact command, and whether the input is a local HTML file or a URL. Reports about missing images are tied to particular versions and systems, so the result is not automatically a defect in every installation.
  2. Make a minimal reproduction. Create one HTML file and one JPG in a temporary directory. Remove CSS, JavaScript, frameworks, and other images. A small case distinguishes path and policy errors from layout or application errors.
  3. Compare browser and converter paths. Check the JPG exists from the account and machine that run wkhtmltopdf. Verify spelling, capitalization, extension, and permissions. Relative URLs resolve from the HTML document’s location, not necessarily from the shell directory where you typed the command.
  4. Inspect the command and wrapper. Search shell scripts, PHP/Python libraries, job definitions, and container entrypoints for --no-images, --disable-local-file-access, a different working directory, or an option that replaces your arguments.
  5. Test the local-file policy narrowly. Allow only the directory containing the HTML and image, then retest. Do not grant a broad filesystem path merely to make one asset work.
  6. Capture diagnostics. Preserve standard error and the exit code. Because failed media can be ignored, a successful process and a PDF file do not establish that every resource loaded.

Fix image loading being disabled

The 0.12.6 usage manual lists --images as the default and --no-images as the disabling switch: wkhtmltopdf usage manual. A direct command should look like this:

#1 Best Overall
Sale
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
wkhtmltopdf --images input.html output.pdf

If that works, remove the accidental --no-images from the wrapper or configuration rather than relying on a command-line override that may be reordered or discarded. Check both global options and per-page options in your library. Some wrappers expose an “images” boolean that writes the switch for you.

Confirm the converter, not a different binary

On systems with multiple installations, which wkhtmltopdf (or the Windows equivalent) can reveal that your application invokes a different executable than your interactive shell. Print the resolved executable path and version from the same service account used by the job.

Fix local JPG paths and URL resolution

Start with an absolute file URL in the minimal test, using the format appropriate to your platform. On Unix-like systems, for example:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
<img src="file:///var/www/app/assets/photo.jpg" alt="Test JPG">

On Windows, ensure the drive-letter form is correctly encoded for a file URL. If an absolute reference works but a relative one does not, move the HTML and asset together temporarily and correct the document base or relative path. Avoid assuming that src="images/photo.jpg" is relative to the directory from which you launched the command; it is resolved in relation to the HTML resource.

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
  • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors

Check case, permissions, and confinement

  • List the exact file name and compare every character, including case.
  • Verify the service account can traverse each parent directory and read the JPG.
  • For containers, confirm the asset is mounted inside the container, not only on the host.
  • Check that a cleanup job has not removed or renamed the file between HTML generation and conversion.

Allow local files without opening the whole filesystem

The manual documents --disable-local-file-access as the default restriction, plus --allow for explicitly permitted locations and --enable-local-file-access to enable local access generally. Prefer the narrowest directory needed:

wkhtmltopdf --allow /var/www/app/assets input.html output.pdf

Use --enable-local-file-access only when the document is trusted and the broader behavior is acceptable:

wkhtmltopdf --enable-local-file-access input.html output.pdf

If your wrapper has its own local-file setting, configure that as well; a library can add a restrictive switch after your code builds the command. Keep the HTML and assets in a dedicated directory and grant only that directory where possible.

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.

Make silent media failures visible

The manual’s default media-load error handling is ignore. That explains the common symptom: progress reaches completion, no obvious command error appears, and the PDF contains a blank area. Run the smallest test while capturing stderr:

Rank #3
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.
wkhtmltopdf --images --allow /var/www/app/assets input.html output.pdf 2>wkhtmltopdf.log
cat wkhtmltopdf.log

The manual also documents --load-media-error-handling. Set an explicit policy supported by your installed build when you need failures to stop the conversion rather than be ignored, and verify the accepted values in wkhtmltopdf --help or the usage manual. Do not treat an empty log as proof that every image loaded; retain the minimal PDF and inspect it.

Check print-media behavior separately

One report describes all images disappearing when --print-media-type was used with wkhtmltopdf 0.12.6 with patched Qt on macOS 12.6.1. That is a report about that setup, not a universal defect. Run two otherwise identical commands:

wkhtmltopdf input.html without-print-media.pdf
wkhtmltopdf --print-media-type input.html with-print-media.pdf

If only the second output is missing images, inspect print-specific CSS and media queries, then decide whether the option is required. Keep the comparison tied to your version, build, operating system, and HTML; do not generalize the report to every platform.

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

JPG-specific checks

  • Open the exact file independently to confirm it is a valid, non-zero-length JPG.
  • Use a simple <img> without CSS transforms, lazy-loading attributes, or script-generated src while diagnosing.
  • Give the image an explicit width and height in the minimal test to rule out a zero-size layout.
  • Try PNG only as a comparison. If PNG works and the JPG does not, inspect the JPG encoding and re-export it with a conventional baseline or progressive profile; keep the original as a separate reproduction artifact.
  • Do not use a browser-only blob URL, object URL, or an application route that requires browser session state unless you provide equivalent access to wkhtmltopdf.

Reliable command patterns

Local HTML and assets

wkhtmltopdf --images --allow /srv/report/assets /srv/report/report.html /srv/report/report.pdf

Remote HTML

wkhtmltopdf --images https://example.com/report /srv/report/report.pdf

For remote pages, a local-file allowance does not fix an HTTP authentication, certificate, DNS, or application-session problem. Diagnose the page URL from the same machine and account, and preserve stderr.

Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient

Performance and reliability considerations

A minimal one-image test is faster and more reproducible than repeatedly converting a full application page. Once it works, add assets back in groups. Keep conversion and asset generation in one controlled job so the JPG cannot be deleted midway. For repeated jobs, log the resolved wkhtmltopdf version, command-line arguments, input path, output path, and stderr. A successful exit code should be treated as “the PDF was produced,” not “all media was verified,” when the media policy permits ignored failures.

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

Or skip the browser setup

If your actual goal is a clean screenshot or PDF of a web page rather than reproducing a local wkhtmltopdf environment, ScreenshotNeo provides a website screenshot API and MCP server. One GET request returns PNG, JPEG, WebP, or PDF. Before capture it accepts cookie/consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks/CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and each response identifies the result with X-Page-Verdict and X-Billed headers. Its MCP tools—take_screenshot, get_page_info, and capture_pdf—work with Claude, Cursor, and other MCP clients.

See the ScreenshotNeo documentation for authentication and all options. The following calls are complete starting points; replace the URL and key.

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

ScreenshotNeo includes full-page capture with lazy images loaded, CSS-selector element capture, dark mode, 12 device presets and custom viewports, retina scale, PDF paper and page-range controls, custom CSS and JavaScript, clicks, waits, ad/tracker/request blocking, headers, cookies, user agents, Authorization, timezone, geolocation, transparent backgrounds, resizing, chosen-TTL caching, signed links, asynchronous jobs with signed webhooks, bulk capture for up to 100 URLs per call, a usage API, and an OpenAPI specification. The parameter names used by other screenshot APIs also work, which can simplify migration.

The Free plan includes 1,000 shots per month with no card. Paid plans start at $5 for 3,000 shots; Growth is $15 for 15,000, Pro $39 for 60,000, Scale $99 for 250,000, and Business $249 for 1,000,000. Yearly billing gives two months free, and every feature is on every plan. Create a free ScreenshotNeo account to try it without a card.

Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.

Troubleshooting by symptom

“Done” appears, but the image area is blank

Assume a missing or blocked media load first. Re-run the one-JPG test, capture stderr, verify the path, and use a narrow --allow directory. The documented default of ignoring media errors makes this symptom expected.

The HTML browser preview works; the PDF does not

Compare the browser’s URL and account with the converter’s file location and account. Replace the relative path with a tested absolute file URL, check permissions, and inspect wrapper-added options.

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

Only a production server fails

Print the executable version and command in that environment. Check container mounts, sandbox policies, working directory, and service-account permissions; do not assume development paths exist in production.

Only --print-media-type fails

Perform the paired comparison, inspect print CSS, and record the exact 0.12.6/build/OS combination before drawing a conclusion.

FAQ

Is --images required?

No. In the documented 0.12.6 defaults, images are enabled; use the switch to make that intent explicit while troubleshooting.

Should I always use --enable-local-file-access?

No. Start with --allow for the specific asset directory and broaden access only for a trusted document when necessary.

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

Does a successful exit code validate every JPG?

No. With media errors ignored, conversion can succeed while one or more images are omitted. Validate a minimal output and retain diagnostics.

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.