Documentation Playground
Docs / File Size
Optimization

File Size & Compression

Automatically optimize and compress high-resolution images within your HTML before generating the PDF, dramatically shrinking the final file size without noticeable quality loss.

Up to 80% Size Reduction Zero Client CPU Usage

Implementation Example

JSON Payload
{ "url": "https://example.com/heavy-images", // Compress image quality to 60% "image_compression_quality": 60, // Resize any image wider than 800px down to 800px "image_compression_width": 800 }

Parameters Explained

Our powerful server-side algorithms intercept image loading, applying dynamic resizing and native format-preserving compression (JPEG/PNG/WebP) directly in-memory before the PDF is compiled.

image_compression_quality
Set a value between 1 and 100. Lower values aggressively compress images to reduce size. We recommend 60-80 for a good balance of size vs quality.
image_compression_width
Set a max width in pixels (e.g. 1000). Any image wider than this will be proportionally resized down before being embedded into the PDF.