October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
Automation

How to Convert HTML to JPG with n8n

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

To convert HTML to JPG in n8n, use a verified HTML/CSS-to-image integration when available: send it your markup and CSS, choose a JPG/JPEG output, then pass the returned binary image to a storage or delivery node. If you have a webpage URL rather than markup, use the integration’s URL-to-image mode. Without a suitable node, use n8n’s HTTP Request node to call a screenshot or rendering API and configure the response as a file.

Choose the right input: HTML or webpage URL

The first choice is whether your workflow has the HTML itself or only an address to capture. The verified HtmlCssToImage integration separates these into “HTML to Image” and “URL to Image” modes, so select the mode that matches your input. n8n describes the integration as able to “Render HTML and CSS as an image or PDF” and to create an image from a URL (n8n HTML/CSS to Image integration; HtmlCssToImage integration listing).

  • HTML to Image: Use this when an earlier node assembles or retrieves the markup. Provide the HTML and any CSS the integration expects.
  • URL to Image: Use this when the workflow receives a public webpage address and should capture the rendered page rather than supply markup.

A URL screenshot and an HTML render are not interchangeable in every workflow. A URL capture depends on the renderer being able to load that page and its assets. An HTML render depends on the supplied markup and whatever external resources it references. Confirm which input mode is exposed by your installed node version and provider.

Build an n8n workflow that returns a JPG

  1. Choose a trigger. Start with a Manual Trigger while building, or use a Webhook, Schedule Trigger, or upstream event when the workflow is ready to run automatically.
  2. Supply the input. For HTML-to-image, add or retrieve the markup and CSS in earlier nodes. For URL-to-image, provide the address as data or configure it directly in the rendering node.
  3. Add the verified integration. Find the HtmlCssToImage integration in n8n’s verified integrations and configure its credentials and input mode. If the relevant node is not available in your n8n installation, use the HTTP Request fallback below.
  4. Select the output format. Choose JPG or JPEG if the node offers it. The HtmlCssToImage node README lists binary JPG as a return format; the Browserless screenshot integration documents JPEG alongside PNG and WebP (HtmlCssToImage node README; n8n Browserless integration).
  5. Check the returned data. Confirm that the output is binary image data, note the binary property name shown in the node output, and verify that the filename or MIME type identifies a JPEG. Downstream nodes need the binary property, not merely a text URL or JSON response.
  6. Deliver or store the file. Map the binary property into a file-capable destination, such as cloud storage, email, or Slack. The integration README describes binary output that can be routed to downstream file destinations (HtmlCssToImage node README).

Make a first test with simple content

Before using production HTML, try a small document with a heading, background color, and one locally embedded or reliably reachable image. Verify that the saved file opens as a JPEG and that its dimensions and appearance are as expected. This separates workflow wiring and binary handling from issues involving external assets or complex page behavior.

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

Prepare HTML, CSS, and assets for reliable rendering

Renderers do not necessarily behave alike. The cited integration pages establish that HTML/CSS rendering and URL screenshots are available, but they do not promise identical handling of fonts, JavaScript, authentication, or long pages across providers. Test the specific provider with the content your workflow will process.

  • External images and stylesheets: Ensure asset URLs are reachable from the renderer. A URL that resolves inside your network or browser may not resolve from an external service.
  • Fonts: Check that web fonts load before capture. If the output falls back to a different typeface, inspect the font URL and renderer access.
  • JavaScript-dependent content: Test pages that populate content after load. Rendering may occur before that content appears unless the provider offers a wait condition or suitable rendering controls.
  • Authenticated pages: A renderer cannot be assumed to share your browser session. Verify the provider’s supported authentication and request configuration before sending protected URLs.
  • Long pages: Confirm whether the selected integration captures the full page or only a viewport, and whether its output limits fit your document.

Use HTTP Request when no suitable node is installed

n8n documents HTTP Request patterns for Browserless and GetScreenshot integrations, making it a practical fallback for REST-based renderers (Browserless in n8n; GetScreenshot in n8n). The exact endpoint, authentication method, request fields, and response format depend on the provider; do not copy another service’s parameter names without checking its API documentation.

  1. Add an HTTP Request node after the trigger and input-preparation nodes.
  2. Set the method and URL to the rendering provider’s documented endpoint.
  3. Configure credentials or authorization using the provider’s instructions. Avoid placing long-lived secrets in workflow data that is logged or exposed to downstream nodes.
  4. Send the required HTML or webpage URL, and request JPEG/JPG using the provider’s documented field or option.
  5. Set the response handling to return a file/binary response rather than parsing the image as ordinary JSON or text. In n8n, response configuration labels can vary by version; inspect the node’s output to confirm binary data is present.
  6. Connect a file-capable destination and map the returned binary property into its file input.

For example, n8n’s Browserless integration documents JPEG screenshot output through HTTP Request. Follow the Browserless API documentation for the exact request structure and credentials rather than assuming the HtmlCssToImage node’s inputs apply to it (n8n Browserless integration).

Keep the binary intact between nodes

Most workflow failures after a successful render come from treating an image as JSON, mapping the wrong binary property, or sending a text field where the destination expects a file. Open the execution data after the HTTP Request node, identify the binary property, and use that exact property in the destination node. If a later transformation node drops binary data, adjust its settings or route the binary around that step.

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

JPG versus PNG and output considerations

JPEG is suitable for photographs and many webpage captures when a smaller, lossy image is acceptable. It does not preserve transparency, and fine text or sharp edges can show compression artifacts. PNG is lossless and usually preferable for crisp text, diagrams, or transparent backgrounds when supported. The available formats depend on the node or API: Browserless documents PNG, JPEG, and WebP, while the HtmlCssToImage README lists PNG, JPG, WebP, and PDF binary output (Browserless integration; HtmlCssToImage README).

If the provider exposes image quality, dimensions, or viewport settings, test them against the actual output use. Larger images and complex pages can take longer or produce larger files, but the cited n8n pages do not establish universal limits, conversion speeds, or costs. Check the selected provider’s current terms and technical limits.

Troubleshooting common failures

Symptom Likely cause What to check
Image output is missing or empty The renderer returned an error, no content was available, or HTTP Request parsed the response as text/JSON. Inspect the node execution and status; configure file/binary response handling and confirm the provider returned an image.
The destination says no file was supplied The destination is mapped to the wrong binary property or received a text field. Inspect the prior node’s binary output and map the exact property name to the destination’s file input.
The output is PNG or another format instead of JPG The selected output option was omitted, unsupported, or ignored. Check the provider’s documented format parameter and confirm the response MIME type and file extension.
Images, fonts, or CSS are missing External assets are inaccessible, blocked, or not loaded before capture. Test asset URLs from the renderer’s perspective and check any required loading or wait options.
Page content is blank or incomplete JavaScript content has not rendered, the page requires authentication, or capture happened too early. Test a simpler page, verify authentication support, and use a provider-supported wait condition if available.
The workflow works manually but not on schedule Input data, credentials, permissions, or network access differ between executions. Compare execution inputs and credential configuration; confirm the renderer can reach the same URL in the automated run.
HTTP Request returns an error status Endpoint, credentials, request fields, rate limits, or provider availability may be involved. Use the provider’s response body and API documentation to diagnose the specific status; avoid retrying invalid requests unchanged.
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 workflow needs to capture a webpage URL rather than render a custom HTML string, ScreenshotNeo offers a single GET request for a screenshot. Its cookie/consent handling accepts the banner as a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each cleanup step can be disabled. Bot checks/CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers report the page verdict and billing status. ScreenshotNeo also provides an MCP server for AI agents, with tools including take_screenshot, get_page_info, and capture_pdf. Its free plan includes 1,000 screenshots per month without a card; paid plans start at $5 for 3,000 shots. See the ScreenshotNeo API documentation.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

For n8n, configure an HTTP Request node to make a GET request to that endpoint, supply your access key and target URL as query parameters, and return the response as a file/binary value. Then map that binary property into your destination node. See ScreenshotNeo for the service details. Sign up free for 1,000 screenshots a month, with no card required.

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.

Frequently Asked Questions

Can n8n take a screenshot of HTML?

Yes. Use the verified HTML/CSS-to-image integration’s HTML to Image mode for markup, or URL to Image for a webpage address; HTTP Request is the fallback for a REST renderer.

Best Value
Sale
PowerShell for Sysadmins: Workflow Automation Made Easy
  • Book - powershell for sysadmins: workflow automation made easy
  • Language: english
  • Binding: paperback

Can HTTP Request return a JPG instead of JSON?

Yes, when the rendering API supports JPEG and n8n is configured to return the response as a file or binary. The exact response setting and request fields depend on the provider and n8n version.

Can the rendered image go to Slack, email, or cloud storage?

Yes. Route the returned binary property to a destination node that accepts files, mapping the correct binary property.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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

Read next

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.