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 minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Use Ferrum to control Chrome or Chromium from Ruby, render a webpage, and save the result directly as WebP. Ferrum avoids Selenium, WebDriver, and ChromeDriver, but it still requires a Chrome or Chromium executable. Set format: "webp" and choose a quality explicitly when output size or image fidelity matters.
What converting HTML to WebP means
HTML is markup, not an image. To make a WebP that reflects the page’s CSS and JavaScript, a browser engine must first render the page; then a screenshot can be encoded as WebP. Ferrum controls Chrome or Chromium using the Chrome DevTools Protocol (CDP), so you can automate that rendering from Ruby without Selenium, WebDriver, or ChromeDriver.
The simplest workflow captures a URL. If your source is an HTML string or a file, make it available to Chrome at a URL—for example, serve it from your application or a local development server—and capture that URL. This also means the browser’s ability to load the page and its assets affects the result: relative stylesheets, fonts, scripts, and images must be reachable from the page.
Install Ferrum and prepare Chrome or Chromium
Add Ferrum to the Ruby application, then make a Chrome or Chromium executable available in the environment where the script will run. Ferrum does not install or replace the browser. If the executable is not discoverable in your environment, configure Ferrum to use the browser’s path according to the Ferrum documentation for your installed version.
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
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
gem install ferrum
For a project managed with Bundler, add gem "ferrum" to the Gemfile and run bundle install. Keep the browser runtime present in development, test, and production environments that execute the capture. Installing the Ruby gem alone is not enough to render a page.
Capture a webpage as WebP
This complete script navigates to a page, saves a full-page WebP, and closes the browser even if navigation or capture raises an error. Replace the URL with the page you want to render.
require "ferrum"
browser = Ferrum::Browser.new
begin
page = browser.create_page
page.go_to("https://example.com")
page.screenshot(
path: "output.webp",
format: "webp",
quality: 80,
full: true
)
ensure
browser.quit
end
The explicit format: "webp" makes the output format clear, and full: true asks Ferrum to capture the document dimensions rather than only the initially visible viewport. Ferrum can also infer a format from a path ending in .webp, but setting the format avoids relying on inference.
Choose quality deliberately
Ferrum’s screenshot implementation supports PNG, JPEG (also spelled jpg), and WebP. For JPEG and WebP, it uses quality 75 by default if quality is omitted. Set quality explicitly when you need predictable choices for file size or visual fidelity. No universally best quality value applies: compare representative output from your own pages and use the setting appropriate to your requirements.
Recommended Free Tools
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Quality is relevant to lossy formats such as WebP and JPEG; it is not a reason to expect a particular byte size or visual result across different pages. A page with large images, fine text, gradients, or transparency may behave differently from a simple page. Check the rendered image at the size and display conditions that matter to your use case.
Capture a region instead of the whole page
When a full-page image is not the desired output, Ferrum accepts selector to capture an element or area to target a region. The method also accepts scale and background_color. Use the selector or area options when you need a component image rather than the entire document; consult the Ferrum documentation for the argument shape supported by your installed version.
Full-page capture uses the document dimensions. On long pages, this can produce a tall image and may take longer or consume more memory than a viewport-sized capture. If you only need one panel or card, target that element instead of capturing the complete document.
Return image data instead of writing a file
By default, the example writes a file at path. Ferrum can return base64 data when encoding: :base64 is selected. This can be useful when another part of the Ruby application needs the encoded image directly, but base64 is not the same as a WebP file on disk. Decode it before writing binary output, and confirm that the selected encoding and format match the receiving code’s expectations.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Rendering your own HTML rather than a public URL
If the HTML belongs to your application, capture it after the app has made it available to the browser. A typical development or test setup is to run the app locally, then pass its local HTTP address to page.go_to. The browser must be able to reach that address from the machine or container running Ferrum. This approach lets the browser resolve relative asset paths in the same way it would for a normal page.
For HTML with no external assets, a data URL can sometimes be useful, but its escaping rules and browser behavior make it less suitable as a general application interface. Serving the document over HTTP is usually easier to debug, especially when it references local CSS, JavaScript, fonts, or images. Do not assume that passing an HTML string to a screenshot call will render it; Ferrum’s screenshot operation captures a browser page, so the browser needs to have loaded or otherwise been given the document first.
Operational choices: local Ferrum or a hosted capture API
| Consideration | Ferrum with local Chrome/Chromium | Hosted screenshot API |
|---|---|---|
| Browser runtime | You install and maintain Chrome or Chromium where Ruby runs. | The provider operates the browser environment; verify the service’s runtime and limits. |
| Application control | Useful when Ruby code needs in-process browser control or access to pages your application can reach. | Useful when you prefer an HTTP integration over managing a browser runtime; confirm how private or authenticated pages are handled. |
| Data movement | The browser runs in your environment, which can help keep rendering within your infrastructure; page requests still go wherever the page and its assets are hosted. | The target URL is processed by the service, so review its privacy, authentication, and data-handling terms before sending sensitive pages. |
| Operations and throughput | You own browser installation, resource use, and capture orchestration. | The service may manage browser operations, but its throughput, retries, and limits are service-specific and should be checked. |
| Cost | There is no per-capture API price stated here; account for the infrastructure and engineering needed to run it. | Pricing and plan limits vary by provider; check current terms before adopting one. |
Ferrum’s advantage is direct local control without the Selenium/WebDriver/ChromeDriver layer. A hosted API can reduce local browser maintenance, but shifts page processing to a provider and makes you dependent on that service’s policies and limits. There is no controlled comparison of speed, image size, or visual fidelity here, so there is no evidence-based performance winner to name.
Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server for developers. Its API can render a URL to an image or PDF, including WebP. For a Ruby project, make the HTTP request with a command-line client or an HTTP library; the cURL example below saves a WebP response. See the ScreenshotNeo API documentation for request options and response details.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
With ScreenshotNeo, cookie and consent banners, newsletter popups, and chat widgets are removed before capture; each cleanup step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers report the page verdict and whether the request was billed. Its MCP server offers take_screenshot, get_page_info, and capture_pdf for AI agents and MCP clients. The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Every feature is available on every plan.
Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshooting common Ferrum capture problems
Ferrum cannot start the browser
Check that Chrome or Chromium is installed in the runtime environment and that Ferrum can find its executable. This commonly surfaces in containers or deployment environments where the Ruby dependency was installed but the browser was not. If the executable is installed in a nonstandard location, configure Ferrum’s browser path as documented for your version.
The output is not WebP
Specify format: "webp" and use a filename ending in .webp. If another part of your code converts the returned data, verify that it has not changed the format or treated base64 text as binary image bytes. Ferrum supports WebP, but downstream tools must also handle it.
The screenshot is cut off or unexpectedly tall
Use full: true for the document dimensions. If the image is still not the desired shape, check whether you actually need a viewport capture, a specific selector, or an area. Full-page mode reflects document dimensions; a long page can therefore result in a very tall output.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Images, fonts, or styles are missing
Check that the browser can load the referenced assets and that relative URLs resolve from the page’s address. A local HTML file or application route may have different asset paths from the public page you expected. Open the same URL in Chrome in the capture environment and inspect whether the page renders as intended before troubleshooting WebP encoding.
The page looks unfinished when captured
Make sure navigation has reached a point where the page content is ready before calling screenshot. Pages that render asynchronously may need application-specific readiness handling. The Ferrum details provided here establish the screenshot options but not a particular universal wait strategy or timeout value; select a wait condition appropriate to the page and verify it against pages with slower content.
Output quality or size is inconsistent
Pass an explicit WebP quality value instead of relying on Ferrum’s default of 75 for WebP and JPEG. Then inspect both image quality and file size on representative pages. A quality setting is a control, not a guarantee of identical output size across different HTML or browser-rendered content.
When this Ruby workflow is a good fit
- Choose Ferrum when your Ruby process should control Chrome or Chromium directly and you can package and maintain the browser runtime.
- Use a full-page screenshot for a whole rendered document; use an element or area capture when the image should contain only part of the page.
- Set WebP quality explicitly if output consistency is important, and test the resulting files with your actual page content.
- Consider a hosted API when you want to avoid local browser setup, after reviewing how it handles private URLs, authentication, data, pricing, and capture limits.
Frequently Asked Questions
Does Ferrum require Selenium or ChromeDriver?
No. Ferrum communicates with Chrome or Chromium through CDP, but the browser executable itself is still required.
Can Ferrum return WebP data without saving a path?
Yes. Ferrum supports base64 encoding through encoding: :base64; decode the returned data if you need a binary WebP file.
Quick 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.

