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

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

Use --width and --height to request a larger rendering surface, and use --zoom only when you intentionally want page content scaled. wkhtmltoimage does not provide a simple image-output equivalent of a camera’s device-pixel-ratio switch. Its screen width is a guideline unless strict-width behavior is enabled, and smart shrinking can make the final pixel-to-DPI relationship non-constant. Always inspect the saved file’s pixel dimensions and layout with the exact binary you deploy.

What “high DPI” means in wkhtmltoimage

A high-DPI image can mean several different things:

  • More saved pixels: the PNG, JPEG or WebP is physically larger in pixel dimensions.
  • A wider or taller CSS viewport: the page lays out at a different width, which can change wrapping, breakpoints and element positions.
  • Page zoom: WebKit scales page content and may change the effective CSS viewport.
  • Device scale: a mapping between logical display units and physical pixels. This can trigger rerasterization or bitmap resampling without changing layout.

wkhtmltoimage’s command-line controls expose the first and third ideas most directly. They do not guarantee a native device-pixel-ratio render. A zoomed capture may contain more pixels while having a different layout, and a large viewport may preserve layout but still be affected by smart shrinking.

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

The controls that actually affect image output

Control What it changes Important qualification
--width <pixels> Requested screen width for rendering The command reference describes width as a guideline unless strict-width behavior is requested; verify the result.
--height <pixels> Requested screen height Without it, height is calculated from page content.
--zoom <factor> Scales rendered page content Page zoom is not the same as device scale and can alter layout.
Smart shrinking Fits content to the available width Enabled by default in the upstream reference; it makes the pixel/DPI ratio non-constant.
Crop options Sets crop left, top, width and height Coordinates and dimensions are pixel-oriented image settings.

Options vary among wkhtmltoimage packages because builds can bundle different Qt/WebKit versions. Run wkhtmltoimage --help on the machine that will perform captures and treat that output as authoritative for available switches.

#1 Best Overall
Sale
Dell 27 Monitor S2725QS, 4K UHD IPS, 120Hz, 5ms, FreeSync Premium
  • Improved ComfortView Plus: Reduces harmful blue light emissions to ≤35%, for all-day comfort without sacrificing color accuracy.
  • Refresh rate: A smooth, tear-free experience with AMD FreeSync Premium (refresh rate up to 120Hz) and an ultra-low 0.03ms response time create a captivating experience for work and play.
  • Vivid colors: Immerse yourself in breathtaking 4K visuals with in-plane switching technology. Enjoy vibrant colors with 99% sRGB. The 1500:1 contrast ratio and HDR readiness deliver excellent depth and detail.
  • Re-engineered sound quality: Enjoy more detailed sound with spacious audio featuring greater output power, deeper frequency response and more decibel range than the previous generation.
  • Ultra-thin bezel: Designed with a sleek, modern aesthetic and an ash white finish, this display features ultra-thin bezels for a refined, minimalist design.

A predictable workflow for a sharper capture

1. Establish the intended CSS layout width

Decide whether the page should look like a 1,280-CSS-pixel desktop viewport, a mobile breakpoint, or another specific layout. This is the width you want to preserve visually. Do not begin by multiplying it by an arbitrary “DPI” number; that can move media-query breakpoints and change line wrapping.

2. Request enough screen pixels

Pass --width and, when the capture must have a fixed canvas, --height. Include the entire page area needed for the crop. For example:

wkhtmltoimage --width 1280 --height 1800 https://example.com page.png

The width is not guaranteed to become the file width in every build. After rendering, inspect the image metadata rather than assuming the command-line value was honored exactly.

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.

3. Add zoom only for intentional content scaling

If text and vector elements must appear larger in the output, test a zoom factor such as 1.5:

wkhtmltoimage --width 1280 --height 1800 --zoom 1.5 https://example.com page-zoomed.png

Zoom can change the CSS viewport and therefore responsive layout. Compare headings, columns, media-query behavior and crop boundaries with the unzoomed version. Calling this “native high DPI” would be misleading: it is page scaling.

Rank #2
Sale
LG 27US500-W Ultrafine Monitor 27-Inch 4K UHD (3840x2160) HDR10 IPS Borderless Design Reader Mode Flicker Safe Switch App HDMI DisplayPort - White
  • 4K UHD with 1000:1 Contrast Ratio - This UltraFine display with a 1000:1 contrast ratio displays deeper blacks and vivid colors in UHD clarity. With wide viewing angles, it gives creative professionals the ability to view and work with highly-detailed, digital imagery.
  • 4K HDR10 DCI-P3 - Explore HDR10 content the way it was meant to be seen with up to 90% DCI-P3 color gamut expression—an elevated color spectrum that brings brilliant color to life.
  • Onscreen Control - You can customize the workspace by splitting the display or adjusting basic monitor options with just a few mouse clicks.
  • Ergonomic Stand - The ergonomic stand makes it easy to flexibly adjust the tilt of the screen in the optimal position for you.
  • What's In The Box - Stand Body, Stand Base, Screws, Power Adapter, HDMI Cable, Quick Start Guide, Registration Card, Warranty.

4. Check smart shrinking

Smart shrinking is enabled by default in the upstream documentation. It can shrink a page to fit and make the relationship between CSS units and output pixels vary. If your result is unexpectedly small or wraps differently, render a comparison with the documented smart-shrinking switch disabled (the exact switch name is shown by your binary’s help output). Keep it disabled only if that produces the layout you need; disabling it is not an automatic quality improvement.

5. Verify pixels, layout and crop

  • Read the saved image’s actual width and height.
  • View representative text at 100% to distinguish rerendered text from enlarged bitmaps.
  • Check responsive breakpoints, line wraps and fixed-position elements.
  • Confirm that the crop contains the intended page region.
  • Repeat the check after upgrading or replacing the wkhtmltoimage binary.

Complete command examples

Large fixed canvas

wkhtmltoimage --width 1920 --height 1200 https://example.com desktop-1920.png

Full-page image with an explicit viewport width

wkhtmltoimage --width 1440 --height 900 --enable-smart-shrinking https://example.com full.png

Full-page behavior and switch names differ by build. If your package supports a height or full-page mode, confirm it with --help; otherwise use an explicit height and crop or stitch pages in your own pipeline.

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

Scaled page content

wkhtmltoimage --width 1280 --height 1600 --zoom 2 https://example.com @2x.png

The “@2x” name is only a naming convention. It does not prove that the file is a device-scale render or that the CSS layout stayed unchanged.

Element-oriented crop

When using the library API instead of the CLI, image settings expose crop left, top, width and height, along with screenWidth and smartWidth. Configure these in pixels, then verify the resulting bitmap. The page-loading settings also include a load.zoomFactor; that is a loading/rendering control, not a PDF DPI setting.

Why --dpi and --image-dpi are usually the wrong answer

The upstream manual places --dpi and --image-dpi in PDF options. They describe PDF generation and image handling when images are embedded in a PDF, not the raster controls for wkhtmltoimage. Copying a PDF recipe into an image command can result in an unknown-option error or no meaningful change.

Rank #3
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

Likewise, a PDF library setting called resolution is documented separately and may have no effect on image output. For wkhtmltoimage, start with screen dimensions, then evaluate zoom and shrinking behavior.

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

Viewport, zoom and device-scale trade-offs

Approach Likely benefit Risk Best use
Increase --width/--height More output pixels and a larger render surface Width is advisory; responsive layout may change Desktop captures where a wider viewport is acceptable
Increase --zoom Larger page content CSS viewport and wrapping can change Deliberately enlarged screenshots
Disable smart shrinking Can prevent unexpected fit-to-width reduction Content may overflow or be clipped Controlled layouts after comparison
Device-scale style rendering Can preserve logical layout while increasing physical pixels in engines that support it wkhtmltoimage’s legacy builds do not expose one consistent switch Only when your specific Qt/WebKit build documents and honors it

WebKit terminology distinguishes device scale from page zoom: device scale does not change viewport or layout, while page zoom does. Qt documentation similarly distinguishes device-independent geometry from raw image-buffer pixels. These concepts explain why a larger file is not automatically a sharper, layout-equivalent capture. Older Qt WebKit APIs describe density relationships and test viewport environment variables, but those historical variables are not a guarantee that every wkhtmltoimage binary honors them.

Performance and reliability considerations

  • Memory: doubling both width and height creates roughly four times as many pixels before encoding. Large full-page captures can exhaust memory even when the page itself is modest.
  • Load timing: external fonts, images and scripts must finish before capture. Use the wait and load controls your build provides, and make the page deterministic where possible.
  • Repeatability: pin the wkhtmltoimage package and record its version, Qt/WebKit build and command-line options. Different distributions can behave differently.
  • Bitmap assets: CSS scaling cannot create detail absent from a low-resolution source image. Supplying larger source assets is necessary when photographs or canvas content look soft.
  • Output format: PNG is useful for lossless text and UI edges; JPEG can be smaller for photographs but introduces compression artifacts. WebP support depends on the binary.
  • Validation: automate checks for file existence, pixel dimensions and non-empty content. A successful process exit alone does not prove that the page rendered correctly.

Troubleshooting common failures

The file has fewer pixels than requested

Cause: width is advisory, smart shrinking applied, or the build interprets options differently. Run wkhtmltoimage --help, compare with smart shrinking disabled, and inspect actual dimensions. Do not infer DPI from the command line alone.

The layout changes when zoom is increased

Cause: page zoom changes the effective CSS viewport. Preserve the original viewport width and avoid zoom when breakpoint stability matters; otherwise adjust CSS and crop for the zoomed layout.

Text is still blurry

Cause: the source font is rasterized at a small scale, a bitmap is being enlarged, or output compression is obscuring detail. Test PNG, confirm the font loaded, and compare at 100% viewing size. More pixels cannot restore detail from a low-resolution source.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Samsung 27" S3 (S32GF) Series FHD High Resolution Monitor
  • VIVID COLORS ACROSS THE WHOLE SCREEN: Experience stunning colors across the entire display with the IPS panel. Colors remain bright and clear across the screen, even when you change angles.
  • SMOOTH PERFORMANCE ACROSS VARIOUS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects.¹ The 120Hz refresh rate reduces lag and motion blur so you don’t miss a thing in fast-paced moments.
  • OPTIMIZED GAME SETTINGS FOR EACH GENRE: Gain a competitive edge with optimizable game settings.² Color and image contrast can be instantly adjusted to see scenes more clearly, while Game Picture Mode adjusts any game to fill your screen.
  • EASY ON THE EYES: Protect your vision and stay comfortable, even during long sessions.² Stay focused on your work with reduced blue light and screen flicker.
  • A MODERN AESTHETIC: Featuring a super slim design with ultra-thin border bezels, this monitor enhances any setup with a sleek, modern look. Enjoy a lightweight and stylish addition to any environment.

Content is clipped after disabling shrinking

Cause: the page is wider than the requested canvas. Increase --width, set an appropriate crop, or re-enable shrinking. Check horizontal overflow before committing the setting.

--dpi is rejected or has no effect

Cause: it is a PDF option, not a wkhtmltoimage raster control. Remove it and configure screen dimensions, zoom and crop instead.

Two machines produce different images

Cause: different wkhtmltoimage versions, bundled Qt/WebKit engines, fonts, libraries or command-line defaults. Capture --help output and version information, install the same package, and compare loaded fonts and assets.

The page is blank or incomplete

Cause: network failures, JavaScript timing, blocked resources or an early capture. Test the URL from the rendering host, add an appropriate delay or wait condition, and verify that required resources are reachable without interactive authentication.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

ScreenshotNeo provides a website screenshot API and MCP server when you need repeatable captures without maintaining a wkhtmltoimage browser stack. It removes cookie and consent banners, newsletter popups and chat widgets before the shot. Bot checks, blank pages, timeouts, failed loads and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server includes take_screenshot, get_page_info and capture_pdf for Claude, Cursor and other MCP clients.

The API supports full-page captures with lazy images loaded, CSS-selector element captures, dark mode, device presets or custom viewports, retina scale, PDF paper and margin controls, custom CSS and JavaScript, clicks, selector waits, delays, network-idle waits, request and resource blocking, headers, cookies, user agents, authorization, timezone, geolocation, transparent backgrounds, resizing, selectable-TTL caching, signed image links, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, usage reporting and an OpenAPI specification. Parameter names used by other screenshot APIs also work, which can simplify migration.

Best Value
Sale
Dell 32 Monitor S3225QS, 4K UHD VA, 120Hz, FreeSync Premium, Eye Comfort
  • Improved ComfortView Plus: Reduces harmful blue light emissions to ≤35%, for all-day comfort without sacrificing color accuracy.
  • Refresh rate: A smooth, tear-free experience with AMD FreeSync Premium (refresh rate up to 120Hz) and an ultra-low 0.03ms response time create a captivating experience for work and play.
  • Vivid colors: Immerse yourself in 4K visuals with a VA panel. Enjoy true-to-life colors with 99% sRGB and 95% DCI-P3 coverage. The 1500:1 contrast ratio and HDR readiness deliver excellent depth and detail.
  • Re-engineered sound quality: Enjoy more detailed sound with spacious audio featuring greater output power, deeper frequency response and more decibel range than the previous generation.
  • Ultra-thin bezel: Designed with a sleek, modern aesthetic and an ash white finish, this display features ultra-thin bezels for a refined, minimalist design.

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 documentation for request options. The Free plan includes 1,000 shots each month with no card; paid plans start at $5 for 3,000 shots, and every feature is included on every plan. Create a free ScreenshotNeo account to start.

When to choose each method

  • Choose wkhtmltoimage when you control the rendering host, need an offline or self-managed pipeline, and can pin the legacy engine and validate its output.
  • Choose ScreenshotNeo when consent cleanup, failure-aware billing, MCP access, modern capture options or avoiding browser infrastructure matters.
  • For either method, define the required CSS layout, output pixel dimensions, crop and acceptable treatment of external assets before automating.

Frequently Asked Questions

Does wkhtmltoimage support a true device-pixel-ratio flag?

The documented CLI controls do not provide one consistent, native device-pixel-ratio switch across builds. Use screen dimensions and test the specific Qt/WebKit binary you deploy.

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

Should I use PNG or JPEG for a high-resolution screenshot?

PNG preserves text and interface edges without lossy compression; JPEG can reduce file size for photographic pages but may soften sharp details.

How can I confirm that a capture is really high resolution?

Inspect the saved file’s pixel width and height, then review text, vectors, bitmap assets and layout at 100% rather than relying on the requested command-line values.

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.