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

Images disappear in Rotativa and wkhtmltopdf when the converter cannot resolve the image URL, is denied access to a local file, has image loading disabled, or finishes before JavaScript creates the image. Start by inspecting the exact HTML and running the converter in the same environment as your application. Then verify Rotativa’s base URL, wkhtmltopdf options, local-file permissions, network access, and media-load logs.

A PDF process can exit successfully while one or more images fail. Treat a missing image as a resource-loading problem, not proof that PDF generation itself failed.

1. Inspect the image reference first

Capture or otherwise inspect the HTML that Rotativa passes to wkhtmltopdf. For every <img>, classify the src value:

  • Relative URL: /images/logo.png or images/logo.png.
  • Absolute HTTP(S) URL: https://example.com/images/logo.png.
  • Local file: a filesystem path or file:// URL.
  • JavaScript-generated URL: the element or its src is created or changed after the initial HTML is loaded.

Open an absolute remote URL from the machine, container, or worker that actually runs conversion—not only from your desktop browser. For a local file, verify that the path exists in that process’s filesystem view and that its operating-system identity can read it. A path available to the web server may not exist inside a separate worker or container.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Epson EcoTank ET-2800 Wireless Color All-in-One Supertank Printer - Black
  • INNOVATIVE CARTRIDGE-FREE PRINTING — No more dealing with lots of tiny ink cartridges; With this wireless document and photo printer each ink bottle set is equivalent to about 90 individual cartridges²
  • LESS FREQUENT INK REPLACEMENT — Replacement ink bottles don't have to be changed nearly as often as ink cartridges¹; When you choose this combination printer, scanner and copier you can print up to 4,500 pages black/7,500 color³
  • COLOR PRINTING — Up to 2 years of ink in the box4 (and with every replacement ink set) for fewer out-of-ink frustrations
  • ZERO CARTRIDGE WASTE — By using an Epson EcoTank printer you can help reduce the amount of cartridge waste ending up in landfills
  • HOME PRINTER DESIGNED FOR RELIABILITY — The Epson EcoTank ET-2800 All-in-One Supertank Color Printer creates vivid, detailed prints and documents thanks to Micro Piezo Heat-Free Technology; Fire off 10 ISO pages per minute1 to easily finish large jobs

Use a browser-independent URL check

Temporarily replace a failing image with a known, reachable test image. If that image renders, the converter is probably working and the original URL, authentication, path, or file permission is the problem. If no image renders, continue with the converter and environment checks below.

2. Check Rotativa’s base URL

Rotativa.AspNetCore states that it injects a base URL into the document head by default. Relative references are resolved against that URL, so inspect the generated HTML for its <base> element and calculate the final URL for each image.

When the injected base URL is wrong

A view containing <img src="images/logo.png"> may resolve to a different host or directory than you expect. Fix the underlying URL assumption rather than adding random slashes:

  • Use an absolute HTTPS URL that the converter can reach.
  • Use a correct absolute path within the application’s public site.
  • Change the view or request context so Rotativa receives the intended base URL.

Rotativa documents a setBaseUrl: false option for disabling injection. Disable it only when your view is deliberately self-contained; removing the base does not repair a relative path by itself. After disabling it, use resolvable absolute URLs or provide another correct base.

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

Check generated HTML, not just the Razor view

Layout files, URL helpers, HTML encoding, conditional rendering, and middleware can change the final markup. Save the exact HTML supplied to the converter and search for empty src attributes, malformed entities, unexpected hostnames, and URLs that are only valid in a browser session.

3. Verify image loading and the effective command

wkhtmltopdf’s documented command-line behavior enables image loading by default; --no-images disables it. Rotativa wrappers and deployment-specific command switches can change that behavior, so inspect the actual arguments rather than relying on defaults.

Rotativa settings to review

  • Confirm the image-loading setting, commonly exposed as web.loadImages, is enabled.
  • Search custom switches for --no-images or an equivalent wrapper option.
  • Log the complete command line during a diagnostic run.
  • Run the same wkhtmltopdf executable manually with the same input and switches.

The Debian Bullseye man page and another operating-system package can differ from your installed build. Check the executable’s own output:

wkhtmltopdf --version
wkhtmltopdf --extended-help

Use the options supported by that binary, not an option copied from a different package.

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 #2
Sale
Epson EcoTank Photo ET-8550 Wireless Wide-Format All-in-One Tank Printer
  • CARTRIDGE-FREE PRINTING — Print lab-quality photos, graphics and creative projects; Get vibrant colors and sharp text with Epson's high-accuracy printhead and Claria ET Premium 6-color inks
  • INK BOTTLES — Save on photos1 and creative projects with affordable in-house printing; All-in-one printer allows you to print 4" x 6" photos for about 4 cents each vs. 40 cents with traditional ink cartridges1
  • LESS FREQUENT INK REPLACEMENT — Replacement ink bottles don't have to be changed nearly as often as ink cartridges¹; Printer, scanner and copier lets you print up to 6,200 color pages³
  • PRINT FOR LONGER — Up to 2 years of ink in the box² (and with every replacement ink set) for fewer out-of-ink frustrations with this wireless printer
  • ZERO CARTRIDGE WASTE — Epson EcoTank printer helps reduce the amount of cartridge waste ending up in landfills; Cartridge-free printer uses high-yield ink bottles; Each replacement ink bottle set is equivalent to about 100 individual ink cartridges⁴

4. Handle local images safely

Local images are governed by wkhtmltopdf’s local-file policy. The documented controls include --disable-local-file-access, --enable-local-file-access, and the narrower --allow option for explicitly permitted files or directories.

Prefer a narrow allow path

If your trusted PDF needs files under /srv/myapp/pdf-assets, grant access only to that directory where supported:

wkhtmltopdf --allow /srv/myapp/pdf-assets input.html output.pdf

For a diagnostic test, broad local access may identify whether policy is the cause:

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

Do not leave broad access enabled for untrusted HTML. A renderer that can read arbitrary local paths may expose configuration files, source code, credentials, or other tenants’ data. Restrict both the allow-list and the account running the converter.

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

Use correct file URLs

When a file URL is required, use a valid URL scheme and encoding for the target operating system. Spaces, backslashes, drive letters, and reserved characters can make a seemingly existing Windows path invalid. Prefer generating a standards-compliant file URL or, where practical, serving the asset from a controlled HTTP endpoint.

5. Test remote images from the converter’s host

For an HTTP(S) image, verify all conditions from the conversion runtime:

  • DNS resolves the image host.
  • Outbound networking is allowed by the host, container, firewall, and proxy.
  • TLS and certificates are accepted by the installed wkhtmltopdf build.
  • The URL does not require browser-only cookies, authentication headers, or a referrer that the converter does not send.
  • The response is an actual image, not a login page, redirect loop, bot challenge, or error document.

Use a command-line request from the same environment to inspect status and headers:

curl -I -L "https://example.com/images/logo.png"

If the application normally adds authorization or custom headers, configure the converter to send equivalent headers or make a suitably protected asset available to the rendering process. Do not embed secrets in HTML that can be exposed in generated documents or logs.

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.
Rank #3
HP Smart Tank 5000 Ink Tank Printer | 2 Years of Ink Included | All-in-One
  • SET IT UP ONCE AND PRINT WITH CONFIDENCE. No complicated maintenance. Just easy, reliable printing you can count on.
  • INK FOR YEARS. NOT MONTHS. Up to 2 years of ink included. Get thousands of pages of cartridge-free printing. More pages, less hassle
  • KEEPS PRINTING WELL AFTER COMPETITORS HAVE QUIT. No complex maintenance. Sharper text, richer colors.[2] Only with HP Smart Tank
  • PREMIUM SUPPORT - Strong technical expertise to solve issues faster
  • THE LAST PRINTER YOU'LL EVER NEED. Enjoy years of refillable, cartridge-free printing.

6. Account for JavaScript and timing

If JavaScript creates an image element or changes its src, inspect the DOM after the script runs. The initial HTML may contain no usable URL at all. wkhtmltopdf’s documented CLI enables JavaScript by default, and wrappers expose JavaScript enablement, delay, and debugging settings.

Choose a condition, not an arbitrary delay

  1. Prefer waiting for a selector that appears only after the image or chart is ready.
  2. If that is not possible, add a delay long enough for the application’s slowest normal response.
  3. Use converter logging or JavaScript debugging during diagnosis.
  4. Confirm that the final src is a reachable URL before printing.

The documented command default includes a 200-millisecond JavaScript delay for matching builds, but that is a software setting, not a guarantee that your page will be ready in 200 milliseconds. Do not copy that value blindly across versions or deployments.

7. Do not trust a successful exit code alone

wkhtmltopdf distinguishes page-load and media-load handling. Media failures can be ignored while conversion continues, producing a valid-looking PDF with missing images. Enable useful diagnostic logging and look for the specific image URL, network error, access-denied message, or missing-file error.

Collect the evidence that identifies the fix

  • The generated HTML, including its <base> element.
  • The complete Rotativa and wkhtmltopdf argument list.
  • wkhtmltopdf --version output.
  • Operating system, container image, and process identity.
  • The exact failing src value.
  • Converter logs showing page and media errors.
  • Whether the asset is relative, remote, local, or JavaScript-generated.

8. Check the deployment context

Rotativa.AspNetCore requires the wkhtmltopdf executable to be accessible to the process running the web application and commonly uses a Rotativa folder convention. The same runtime-context rule applies to images: the converter must read local files and reach remote URLs under the actual service identity.

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

Linux confinement and mandatory access controls

Ordinary Unix permissions can look correct while AppArmor or another mandatory access-control profile denies the path. Check system logs for denials and configure the profile to permit only the application’s working and asset directories. Keep temporary files in a directory the profile and service account can both access.

Containers and separate workers

Confirm that the image is present inside the container, not only on the host. Mount the asset directory at the path used in the HTML, or generate URLs that resolve inside the container’s network. If a background worker performs conversion, give it the same configuration, certificates, DNS, proxy settings, and asset access as the web process.

9. A practical decision tree

Symptom Most likely area Next check
Every image is missing Images disabled, inaccessible converter, or global network/file policy Log effective arguments; verify web.loadImages; test one known image manually
Only relative images are missing Incorrect base URL or URL construction Inspect <base> and resolve the final URL
Only local images are missing Local-file policy, path syntax, permissions, or AppArmor Test a narrow --allow directory and inspect denial logs
Only remote images are missing DNS, TLS, proxy, authentication, or blocked outbound access Request the URL from the converter host
Images appear intermittently JavaScript timing, slow network, or caching Wait for a readiness selector; compare logs and disable caching temporarily
PDF succeeds with warnings Media errors being ignored Review media-load handling and converter logs
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

10. Common errors and targeted fixes

“Blocked access to file” or local-file restriction

Confirm the path exists for the converter account, then use a narrowly scoped --allow directory. Use --enable-local-file-access only as a controlled diagnostic or when the trusted deployment genuinely requires broad access. If the option appears ineffective, verify the actual binary, argument ordering, wrapper output, and security profile.

The URL works in Chrome but not in the PDF

Chrome may supply cookies, JavaScript APIs, modern TLS behavior, a user agent, or an interactive challenge that wkhtmltopdf does not. Test the final URL without those browser-only assumptions and provide explicit headers or a server-side asset where appropriate.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Sale
NDYIN Portable Printers Wireless for Travel, N80 Bluetooth Thermal Printer
  • Wireless Bluetooth Printer: Portable thermal printer compatible with iPhone, Android phones, iPad and tablet computers via Bluetooth. For smartphones, please download the "Nada Print" App. You can also connect to laptops and computers for printing using a USB-C cable. (Note: Laptops and computers can only be connected via USB and require the installation of a driver first. Bluetooth connection is not supported.)
  • No-ink printing: Only supports US Letter and A4 size thermal paper.(Doesn't support regular paper) The no-ink portable thermal printer uses direct thermal technology, requiring no ink, toner or ribbons, making it environmentally friendly, cost-effective and time-saving. The thermal printer package comes with a roll of US Letter thermal printing paper. Note: When installing the paper, remember to switch the paper size switch on APP
  • Clear Print: NDYIN N80 portable thermal printer adopts high-definition printing technology, with a 203DPI resolution to provide you with clear printing results. This mobile printer is compatible with roll paper, folded paper and tattoo transfer paper, supporting printing from your mobile phone PDF, Word, pictures and web pages anytime and anywhere. It is recommended to use our NDYIN thermal paper to achieve good printing quality
  • Portable wireless printer for travel: The thermal printer is equipped with a built-in 1500mAh rechargeable battery, which can print 160 sheets of 8.5" x 11" thermal paper after being fully charged. It weighs only 1.5 pounds and is compact in size. This ink-free portable printer can be easily carried in a backpack or briefcase! It is perfect for business travel, cars, small offices, construction sites, schools and homes. You can print documents, contracts, invoices and boarding passes anytime and anywhere
  • The N80 thermal printer has a wide range of uses. The package includes the N80 printer, a roll of US Letter paper(7m/roll), a user manual, a guide card, a type-C soft cable and a type C adapter. Note: The charging adapter is not included. Special thermal paper is required for use; ordinary paper cannot be used. This ink-free portable thermal printer is suitable for various scenarios such as home, school, travel, office, and outdoor, meeting the printing needs of different groups of people. This tattoo template printer is also compatible with tattoo transfer paper, making it an ideal choice for tattoo art

Changing the base URL made no difference

A base URL affects relative references only. It cannot grant local-file permission, fix a typo, authenticate a remote request, or wait for JavaScript. Resolve the resulting URL and test that URL from the renderer’s environment.

The option is documented but unknown to the executable

Package builds vary. Run the installed executable’s help and version commands, remove unsupported switches, and use the settings exposed by your Rotativa package. Do not assume a distribution-specific man page describes every build.

A Windows path still fails after enabling local access

One issue report from June 7, 2022 describes this symptom on Windows 10 Pro with wkhtmltopdf 0.12.6, but it does not prove that the option generally fails. Check malformed path URLs, quoting, actual executable arguments, and the process account before treating the report as a universal explanation.

Or skip the browser setup

If your requirement is simply to obtain a clean image of a URL rather than render an ASP.NET view through your own browser stack, ScreenshotNeo provides a website screenshot API and MCP server. It accepts cookie and consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed; each response identifies the result with X-Page-Verdict and X-Billed headers.

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

One GET request returns PNG, JPEG, WebP, or PDF. The API supports full-page capture with lazy images loaded, CSS-selector element capture, dark mode, device presets or custom viewports, retina scale, PDF paper and margin controls, custom CSS and JavaScript, clicks, selector or network-idle waits, request and resource blocking, headers, cookies, user agents, authorization, timezone and geolocation, transparent backgrounds, resizing, chosen cache TTLs, signed image links, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, usage reporting, and an OpenAPI specification. Its parameter names are compatible with those used by other screenshot APIs, which can simplify migration.

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

See the ScreenshotNeo API documentation for options and response headers. An MCP server exposes take_screenshot, get_page_info, and capture_pdf to Claude, Cursor, and other MCP clients, so AI agents can perform captures without your own browser setup. The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots, and every feature is available on every plan.

Sign up for the free ScreenshotNeo plan to try 1,000 screenshots per month without a card.

Frequently Asked Questions

Does adding an absolute URL always fix a missing image?

No. The converter still needs network access, compatible TLS, any required authentication, and a response that is actually an image.

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

Should I enable local-file access permanently?

Only when trusted input requires it and you understand the exposure. A narrowly scoped --allow directory is safer than broad access.

Why does the PDF generate when an image fails?

wkhtmltopdf can continue after media-load errors, so process success does not prove that every resource loaded.

What information should I include in a bug report?

Include generated HTML, the exact image src, Rotativa switches, wkhtmltopdf version, operating system or container details, process identity, and media-load logs.

Quick Recap

Bestseller No. 3
HP Smart Tank 5000 Ink Tank Printer | 2 Years of Ink Included | All-in-One
HP Smart Tank 5000 Ink Tank Printer | 2 Years of Ink Included | All-in-One
PREMIUM SUPPORT - Strong technical expertise to solve issues faster; THE LAST PRINTER YOU'LL EVER NEED. Enjoy years of refillable, cartridge-free printing.
$192.07

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.

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