PC 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 & 11Crashes, 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 minuteRender the HTML in a browser, capture the part you need as a JPEG, then check the saved file’s actual byte size. If it is too large, reduce the image dimensions, lower JPEG quality, or both, and export again. No single quality setting can guarantee a file under 100 KB for every page: text, images, page length, and pixel dimensions all affect the result.
This guide uses Playwright to make the process repeatable. It covers local HTML files and web pages, viewport, element, and full-page captures, and how to verify that the result meets the limit without making the image unreadable.
What you need to decide first
HTML is markup, not a picture. To convert it to an image that shows how the page looks, a browser must first render the HTML with its styles, fonts, and images. A screenshot captures that rendered result; exporting it as JPEG applies lossy compression.
Before capturing, decide what the image must show. A whole long page can be far larger than a single screen or a focused component. Choose the smallest capture area that still includes the information the recipient needs.
Free tools Windows power users keep installed
One-click scans. No signup required.
#1 Best Overall
- 2x3" Portable Photo Printer: The upgraded PP01 photo printer uses advanced inkjet technology. This portable photo printer produces vivid, full-color prints on premium sticky-backed photo paper that is smudge-proof, water-resistant, and tear-resistant. The Nelko mini photo printer is pocket-sized and weighs only 308g, making it ultra-portable for school, travel, and field trips. Each ink cartridge prints up to 80 full-color 2x3 photos on sticky-backed paper
- Easy Printing via Bluetooth: The PP01 mini photo printer is compatible with iOS and Android phones via Bluetooth. Simply download the Nelko app from Google Play or the App Store. Load the 2x3 photo paper with the smooth side facing down. Install the ink cartridge, connect via Bluetooth, and print directly using the Nelko app. A USB charging cable is included; the adapter is not included
- High Photo Quality: This mini photo printer uses advanced inkjet technology for clear, vibrant prints. This portable photo printer produces 600 DPI high-resolution images with precise colors, capturing fine details and realistic tones. Each photo comes with adhesive backing, perfect for scrapbooks and preserving your memories. Personalize every photo for holidays, birthdays, or daily events
- Powerful App: The Nelko 2x3" PP01 photo printer app lets you edit photos and offers a variety of frame designs, making it perfect for personalizing your photos for projects like scrapbooking or journaling. Download the Nelko app to create collages and customize photos with filters, graffiti, borders, stickers, text, AI image editing, and many other features. Edit photos on your phone, then send them to the Nelko app for instant printing in under 90 seconds
- Versatile Usage Scenarios: This portable photo printer is ideal for travel journals, party favors, and family gatherings. Students use it for planners and photo printing. Crafters use it for DIY projects, custom labels, and scrapbooking. It's a practical tool for bloggers, small businesses, and event photographers to create instant giveaways. Perfect for Mother's Day surprises and heartfelt moments with loved ones using Nelko sticky-backed photo paper.
| Capture type | Use it when | Size consideration |
|---|---|---|
| Viewport | You need only the portion visible in the browser window. | The viewport sets the image dimensions; a smaller viewport generally means fewer pixels. |
| Element | You need one card, chart, or section rather than the surrounding page. | Excluding unrelated content can reduce the captured area. |
| Full page | You need the entire scrollable document. | A long page can create a very tall image with many pixels, increasing the work needed to meet the size limit. |
Also check whether JPEG is appropriate. JPEG does not preserve transparency. If the image must have a transparent background, choose a format that supports it instead; Playwright’s omitBackground option does not apply to JPEG.
Convert HTML to a JPG with Playwright
Playwright’s screenshot API supports JPEG output and a quality value from 0 to 100; its documented default is 80. Its scale: 'css' option captures one image pixel per CSS pixel, avoiding the extra resolution that can otherwise result from a high-DPI device scale. These controls change the output, but they do not promise a particular file size.
1. Install Playwright
For a new Node.js project, install Playwright and its Chromium browser:
npm init -y
npm install -D playwright
npx playwright install chromium
Run these commands in the project directory. The browser installation is separate from installing the JavaScript package; if Chromium is missing, run the install command again in the same environment where your script will run.
Recommended Free Tools
2. Save a screenshot script
Save this as capture.mjs. Set TARGET to a page URL or a local HTML file. For a local file, replace the example URL with a file URL such as file:///absolute/path/to/page.html. The local HTML file must be able to load any assets it references.
Rank #2
- User-Friendly Portable Photo Printer for iPhone, Android & PC - Get beautiful and colourful memories with Liene 4x6 photo printer! After opening the entire package, you can find one cartridge + 20 sheets of photo paper (placed inside the machine packaging), as well as an additional box containing 80 sheets of photo paper (which includes two cartridges + 80 sheets of photo paper). Full package includes smartphone photo printer, Liene 4x6 photo printer papers (100 sheets), 3 colour cartridges, and fully sealed cassette to prevent dust. Minimalist and magnetic design for compact storage.
- Superior Quality 4x6 Photo Printer - Print photos like no other thanks to the thermal-dye sublimation tech adopted by the picture printer for iphone. The dyes deeply penetrate the paper for vibrant photo printing, and the laminated surface is resistant to water, scratches, fingerprints and fading. Clean the print head promptly if smudges are observed on printed photos during operation. Get Liene photo printers now for yourself and your loved ones, print your happy moments together and keep your love forever!
- Wi-Fi Photo Printer for Smartphone - The built-in hotspot of the photo printer makes it easy to print pictures from your phone, avoiding outside interference with a fast and stable connection. No other networks required! Simply connect your device to the independent instant photo printer 4x6 hotspot.
- Multiple Device Compatibility - Liene phone printer provides instant photo printing for up to 5 simultaneous connections. Share with family and friends or print from your different devices. No additional cables or Bluetooth required when printing photos with this picture printer. Note: Ensure the ink cartridge clicks into place before printing.
- Customize your Printing with the Liene App - Customize your photos with our specialized App! You can add a Square border, insert filters, enhance the contrast and brightness, check printing status, and more. You can even print your ID and Visa photos from home with this photo printer for iphone 4x6 prints.
import { chromium } from 'playwright';
import { stat } from 'node:fs/promises';
const TARGET = 'https://example.com';
const OUTPUT = 'page.jpg';
const QUALITY = 70; // Starting point only; check the resulting file.
const browser = await chromium.launch({ headless: true });
try {
const page = await browser.newPage({
viewport: { width: 1280, height: 800 },
deviceScaleFactor: 1
});
await page.goto(TARGET, { waitUntil: 'networkidle', timeout: 60_000 });
await page.screenshot({
path: OUTPUT,
type: 'jpeg',
quality: QUALITY,
scale: 'css'
});
const bytes = (await stat(OUTPUT)).size;
console.log(`${OUTPUT}: ${bytes} bytes (${(bytes / 1000).toFixed(1)} kB)`);
} finally {
await browser.close();
}
Run it with node capture.mjs. The quality of 70 is an illustrative starting point, not a guaranteed preset. The script prints the actual byte count after the file is written.
3. Adjust the capture before compressing further
If the JPG is too large, make one controlled change at a time, capture again, and check the new file. That makes it easier to see whether the size reduction came from the capture area, dimensions, or quality.
- Capture only what matters. For a component, use an element screenshot instead of a full-page screenshot. For a long page, consider whether a viewport or a smaller section will meet the need.
- Reduce dimensions if the display allows it. Lower the viewport width and height, then confirm the text remains legible at the intended display size. A smaller image can lose useful detail if it is enlarged later.
- Lower JPEG quality gradually. Change
QUALITYin measured steps and inspect the resulting image, especially small text, fine lines, gradients, and photographs. Lower quality can introduce visible compression artifacts. - Keep CSS-scale output when a high-DPI capture is unnecessary.
scale: 'css'avoids extra pixels beyond the CSS dimensions; it does not resize the CSS viewport itself.
Do not assume that a given quality value always produces the same file size. Two pages with identical dimensions may compress differently because their visual content differs.
Target a viewport, element, or full page
Viewport screenshot
The main example captures the current viewport: 1280 by 800 CSS pixels in this case. Change those dimensions in newPage to control the visible browser area. This is often the most practical choice when the image will be shown at a known size.
One element
Wait for the element to appear, then pass its locator to screenshot. This captures the element rather than the page around it:
Rank #3
- Dock Photo Printer: The KODAK Dock Plus is a home photo printer that produces high-quality 4x6” prints directly from compatible smartphones. Featuring an integrated docking station, users can place their phone on the printer for better connection while simultaneously charging the device during printing.
- Genuine 4PASS dye sublimation printing: Each photo is produced in three color layers and finished with a clear protective lamination layer. In approximately 55 seconds, you receive a smooth, detailed print designed to resist fingerprints, water, and fading for long-lasting quality.
- Easy to Use: Print photos quickly without complicated setup or technical steps. Simply power on, connect wireless bluetooth, and start printing within seconds. The Dock Plus is built for straightforward operation, making it ideal for first time users and everyday photo printing.
- Home Printing Station: Designed for stable desktop use, this dock photo printer connects to a power outlet for consistent performance and larger 4x6” prints. Ideal for home printing, photo albums, framing, family events, and everyday picture printing.
- KODAK Photo Printer APP: Featuring integrated Bluetooth connectivity, this portable printer connects to compatible iOS and Android devices through the KODAK Photo Printer app. Edit, crop, and customize your photos before printing for creative results.
const card = page.locator('.report-card');
await card.waitFor({ state: 'visible', timeout: 15_000 });
await card.screenshot({
path: 'card.jpg',
type: 'jpeg',
quality: 70,
scale: 'css'
});
Replace .report-card with a CSS selector that identifies the intended element. If the selector matches multiple elements, make it specific enough to select the correct one. A very large element can still exceed the file limit.
Full-page screenshot
To capture the full scrollable document instead of just the viewport, add fullPage: true to the page screenshot options:
await page.screenshot({
path: 'full-page.jpg',
type: 'jpeg',
quality: 70,
scale: 'css',
fullPage: true
});
Because this may produce a tall image, check both its dimensions and byte count. If it is too large, reduce the rendered width or capture a smaller region if the whole page is not essential.
Load content before capturing
A screenshot can only include content that has rendered by the time capture begins. The sample waits for networkidle, but pages with continuous network activity may not reach that state, while some dynamic content may appear after network requests have stopped.
For a page with a known readiness condition, wait for that condition explicitly. For example, replace the page.goto line with the following when the page’s main content has a stable selector:
Rank #4
- Instant Photo Printing: The KODAK Mini 2 Retro is a portable photo printer designed to turn smartphone pictures into high quality prints in seconds. Whether capturing family moments, travel highlights, journaling pages, or creative projects, this mini printer lets you print real photos anytime, anywhere.
- Genuine 4PASS dye sublimation printing: Each photo is produced in three color layers and finished with a clear protective lamination layer. In approximately 55 seconds, you receive a smooth, detailed print designed to resist fingerprints, water, and fading for long-lasting quality.
- Easy to Use: Print photos quickly without complicated setup or technical steps. Simply power on, connect wireless bluetooth, and start printing within seconds. The Mini 2 Retro is built for straightforward operation, making it ideal for first time users and everyday photo printing.
- Print Anytime, Anywhere: Small enough to fit in your hand, bag, or even a pocket, the Mini 2 Retro is built for on-the-go printing. Ideal for parties, trips, school projects, scrapbooks, and spontaneous moments where you want real prints without waiting.
- KODAK Photo Printer APP: Featuring integrated Bluetooth connectivity, this portable printer connects to compatible iOS and Android devices through the KODAK Photo Printer app. Edit, crop, and customize your photos before printing for creative results.
await page.goto(TARGET, { waitUntil: 'domcontentloaded', timeout: 60_000 });
await page.locator('main .report-card').waitFor({ state: 'visible', timeout: 30_000 });
Use a selector that indicates the actual content you intend to capture. If remote fonts or images matter, confirm they have loaded before saving; otherwise the screenshot may show fallback fonts, blank image areas, or a partially rendered page. Local HTML also needs access to its linked CSS, scripts, fonts, and images.
Check what “under 100 KB” means
Some destinations mean at most 100,000 bytes when they say 100 KB; others use 102,400 bytes. The destination’s own limit is authoritative. If it specifies an exact byte maximum, compare the saved file with that number. If it does not, aim below 100,000 bytes to leave a margin.
The script reports bytes directly, which avoids relying on a rounded display such as “99.9 kB.” To enforce a strict 100,000-byte maximum, add this check after the stat call:
if (bytes >= 100_000) {
throw new Error(`JPG is ${bytes} bytes; reduce dimensions or quality and export again.`);
}
If a receiving system accepts files only below a limit rather than at the limit, stay under its stated maximum, not merely close to it. After reaching the byte target, open the final image and confirm that its text and details are still useful.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Common problems and fixes
- The output is still over 100 KB. The page may have too many pixels or visually complex content for the current quality setting. Capture a smaller region, reduce viewport dimensions, or lower quality in steps, checking the saved byte count after every export.
- The text is difficult to read. The image may be too small for its intended display or compressed too aggressively. Restore some quality or dimensions, or capture only the relevant section so it can remain larger without including unnecessary page area.
- The screenshot is blank or incomplete. The page may not have rendered its content before capture, or a local or remote asset may not have loaded. Wait for a content-specific selector, check that the page and its assets are accessible, and capture again.
networkidletimes out. Some pages maintain ongoing network connections or activity. Navigate withdomcontentloadedand wait for a specific visible content selector instead of waiting for network idle indefinitely.- The browser does not launch. Chromium may not be installed in the environment running the script. Run
npx playwright install chromiumthere, and check that the environment can launch a browser. - The JPG has an unwanted background. JPEG does not carry transparency. Use an image format with transparency if that is required;
omitBackgroundis not a JPEG solution. - A local page is missing images or styles. Its assets may use paths that do not resolve from the file’s location or may not be available to the browser. Check the HTML’s asset paths and ensure those resources can load before capture.
Performance, repeatability, and cost
A local Playwright workflow is useful when you need control over browser setup, capture timing, selectors, or file output. It does require installing and running a browser, and each page must load its needed content before capture. For repeated captures, keep the viewport, capture target, and loading condition consistent, then inspect output sizes rather than assuming the same quality setting will always yield the same byte count.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsBest Value
- STEP UP YOUR PRINTING GAME. KODAK Step Printer Connects to Any iOS or Android Device [Via Bluetooth or NFC] Turn Your Selfies, Portraits, Social Media Posts Into Physical Photos.Package Includes : KODAK STEP Instant Mobile Photo Printer, Micro USB Charging Cable, Starter Pack of KODAK ZINK Photo Paper, Quick Start Guide, Limited Warranty
- AMAZING ZERO-INK TECHNOLOGY. ZINK 2” x 3” Sticky-Back Paper with Embedded Dye Crystals Delivers High-Quality, Durable, Affordable, Beautifully Detailed Prints That are Resistant to Moisture, Rips, Tears & Smudges.
- FULL EDITING SUITE VIA APP. Download the KODAK App to Create Collages & Customize Your Snaps with Stunning Filters, Interesting Borders, Cool Stickers, Funny Text & Other Personalized Flair.
- TAKE YOUR PROJECTS TO GO. Our Palm-Sized Printer Weighs Less Than a Pound, Sets Up Fast & Delivers Gorgeous Prints You Can Peel & Stick Everywhere.
- CUTE, COMPACT & COLORFUL. Step Printer is Designed for Photo-Loving Influencers & Crafters of All Ages & Skill Levels! Portable, Lightweight Device Features Built-In Lithium-Ion Rechargeable Battery [Prints 25 Photo on a Full Charge]
There is a trade-off between file size and visual usefulness: reducing dimensions or quality can help meet a strict limit, but can also make text and detail harder to read. Choose a target display size first, then tune the output against both the byte limit and a visual check.
Or skip the browser setup
If the HTML is already available at a public URL, ScreenshotNeo can return a screenshot with one GET request. It is a website screenshot API and MCP server for developers. Its cleanup options accept cookie or consent banners like a visitor and remove more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers report the page verdict and billing status. Its MCP server offers take_screenshot, get_page_info, and capture_pdf for AI agents and MCP clients.
The following cURL example captures a URL as WebP, as shown in ScreenshotNeo’s API example. If your destination specifically requires JPG, choose JPEG output using the API’s supported parameters in the ScreenshotNeo documentation, then check the returned file’s actual size: a screenshot service cannot guarantee that every page will fit under 100 KB without quality or dimensions trade-offs.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
ScreenshotNeo’s Free plan includes 1,000 shots per month without a card; paid plans start at $5 for 3,000 shots. Every feature is on every plan. Learn more at ScreenshotNeo, or sign up free for 1,000 screenshots a month with no card.
Frequently Asked Questions
Can I convert raw HTML without hosting it?
Yes, Playwright can navigate to a local HTML file using a file URL, provided the file and its referenced assets are accessible to the browser.
Does JPEG support a transparent background?
No. JPEG is opaque; use a format that supports transparency if the background must remain transparent.
Why did the same quality setting create a different file size?
JPEG size depends on the rendered pixel dimensions and image content as well as the quality setting, so a fixed quality does not imply a fixed byte count.
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.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →




