ScreenshotNeo

BlogHow-to

SingleFile file size too large: ways to reduce webpage archive size

Reduce a large SingleFile archive with HTML and style cleanup, image options, and selective resource removal while checking the saved page stays useful.

By the ScreenshotNeo team4 October 20266 min read

If your SingleFile archive is too large, start by enabling Compress HTML content and Remove unused styles. Then remove unused or alternative fonts and image variants. If the page is still too large, reduce image dimensions gradually. Removing frames or setting a maximum resource size can save more space, but those options omit content or resources. Change one or two settings at a time, save a representative page, and reopen it offline to check that it is still useful.

There is no reliable universal savings percentage: results depend on the page’s markup, images, fonts, embedded content, and output format. SingleFile’s FAQ says its default configuration is already optimized to produce small pages, so the options below are useful when a particular page still exceeds your storage or transfer limits. See the [SingleFile options help](https://github.com/gildas-lormeau/SingleFile/wiki/Options) and [FAQ](https://github.com/gildas-lormeau/SingleFile/wiki/FAQ) for the current labels and behavior.

1. Start with cleanup that preserves page content

In SingleFile’s options, enable these first:

  • Compress HTML content: removes comments and unnecessary tags, spaces, quotes, and whitespace. The help describes this option as reducing file size “without altering the document.”
  • Remove unused styles: strips CSS rules that are not used by the saved page. This can reduce size considerably, but it uses more CPU and can increase save time.
  • Remove unused and alternative fonts: avoids embedding font files the page does not need, or alternate font variants that are not required for the saved result.

Save a representative page and open the result locally. Check its layout, text, navigation, and any interactive content you care about. If it looks right, keep the settings and proceed to the next step only if you need more reduction.

2. Remove redundant image assets

If the archive is still large, consider enabling Remove alternative-resolution images. Pages often include several image variants for different screen sizes; removing alternatives can reduce the archive, but may affect which versions are available in the saved page.

Where the option is available, Group duplicate images prevents the same image from being saved repeatedly in supported output formats. This setting is ignored for ZIP-based formats, so do not expect it to reduce those archives.

3. Resize images when their visual detail is expendable

SingleFile’s Size reduction factor is a divisor applied to image dimensions. The default is 1, meaning no reduction. A factor of 2 halves width and height; 4 reduces each dimension to one quarter. This applies to PNG, JPEG, and WEBP images. Smaller dimensions can reduce file size, but the final size does not necessarily fall in the same proportion, and image detail may be lost.

  1. Try a factor of 2 first.
  2. Reopen the archive and inspect photos, diagrams, and small text embedded in images.
  3. Increase the factor only if the result remains clear enough for its intended use.

The Image quality setting applies to resized JPEG and WEBP images. Its default is 0.8. Lower quality can reduce their size further but can make artifacts more visible. It does not affect PNG images.

4. Exclude content only when completeness is optional

These settings reduce size by leaving material out. They are useful when you only need the main page, but they are not lossless compression:

Option What it can omit Tradeoff
Remove frames or iframes Embedded documents and other framed content The archive may no longer show embedded media, widgets, or subpages.
Remove hidden elements Elements hidden in the source page It may take more processing, and content that becomes visible later may be absent.
Maximum resource size Any embedded resource above the selected limit, including images, stylesheets, scripts, and iframes Oversized resources are omitted altogether; the page can look or behave differently.

Use a maximum resource size only when you have reviewed which resources can be dropped. A missing stylesheet or script can change more than the archive size.

5. Keep output format and completeness tradeoffs in mind

  • Leave ZIP compression enabled when file size matters. SingleFile’s help says disabling ZIP compression increases the resulting file size.
  • Duplicate-image grouping does not apply to ZIP-based formats.
  • Saving deferred content can preserve material that appears after interaction or scrolling, but can increase save time and add content to the archive.
  • Removing frames or disabling deferred-image saving may leave resources missing. Check the saved copy if completeness matters.
  • Disabling cleanup can save processing time, but may leave the archive larger.

6. A practical reduction workflow

  1. Pick a representative page and save a baseline copy with your current settings.
  2. Enable HTML compression, unused-style removal, and unused or alternative font removal.
  3. Save again and compare file sizes. Reopen the copy offline and check its important content.
  4. If needed, remove alternative-resolution images and use duplicate-image grouping when the output format supports it.
  5. If images dominate, try a size reduction factor of 2, then inspect image clarity before considering a larger factor or lower JPEG/WEBP quality.
  6. Only then consider excluding frames, hidden elements, or resources above a maximum size.
  7. Keep a short note of the settings used for each type of page so you can repeat a useful configuration.

Compare the resulting file sizes on the same page and with the same output format. The available documentation describes which controls can reduce size, but does not give a typical percentage or megabyte saving. Actual results depend on the page’s resource mix.

7. Troubleshooting a large or incomplete archive

Symptom Likely cause What to try
The archive is still very large Large embedded images, fonts, or other resources dominate the file; markup cleanup has limited effect on them. Remove alternative image variants and fonts. If image detail is not essential, raise the size reduction factor gradually.
Images look blurry or too small The size reduction factor reduced their dimensions, or resized JPEG/WEBP quality is too low. Lower the reduction factor toward 1 and raise image quality for JPEG/WEBP. The quality option does not change PNG images.
Part of the page is missing Frames, deferred images, hidden elements, or resources above the maximum size may have been omitted. Review those options and restore the relevant content. Avoid a maximum resource limit that excludes required files.
Saving takes longer or uses more CPU Unused-style removal and hidden-element removal require additional processing; saving deferred content can also take longer. Disable the expensive cleanup option if the time cost outweighs its size benefit, or use a simpler configuration for pages where speed matters.
The ZIP archive became larger ZIP compression may have been disabled, or you expected duplicate-image grouping to apply to ZIP output. Keep ZIP compression enabled. Duplicate-image grouping is ignored for ZIP-based formats.
The saved page differs from the live page Some resources or dynamic content were not captured, or an exclusion setting removed them. Check frame and deferred-content settings, then reopen the saved page offline and compare the sections you need.

8. Performance, reliability, and storage considerations

More aggressive cleanup has a processing cost. Removing unused styles can substantially reduce output but increase CPU consumption and save time; removing hidden elements may also take more processing. Saving deferred content adds capture work and can increase the archive’s contents. If you save many pages, use a representative sample to decide whether the reduction is worth the extra time.

For reliable archives, treat omission settings as content decisions. Keep the original page or a less aggressive copy when you need a complete record. Reopen the saved file offline after changing settings, especially when the page depends on iframes, scripts, deferred images, or large stylesheets.

Or skip the browser setup

If your goal is a screenshot rather than a self-contained HTML archive, ScreenshotNeo captures a page through one API request. It does not replace SingleFile when you need an offline webpage archive. The [API documentation](https://screenshotneo.com/docs/) has request options and response details.

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

Cookie banners, popups, and chat widgets are removed before the shot. Bot checks, blank pages, and failed loads are never billed. An MCP server lets AI agents take screenshots. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up for 1,000 free screenshots a month.

FAQ

Will HTML compression change how my saved page looks?

The option is documented as removing unnecessary markup and whitespace without altering the document. Still, reopen your own saved page to confirm it meets your needs.

Does a size reduction factor of 2 cut the file size in half?

No. It halves image dimensions, not the overall archive size. The result depends on how much of the page consists of affected images and how those images encode.

Should I remove frames from every archive?

Only if the embedded content is not needed. Frames and iframes can contain meaningful page material.

Why is there no expected savings percentage?

The official help and FAQ explain option behavior but do not provide standard savings figures. Page resources and output formats vary, so measure a representative page instead.

Sources