Image optimization

When enabled, Edgelin automatically optimizes images and other assets served through your endpoint. This reduces bandwidth and improves page load times without changes to your origin server.

Enabling Image Optimization

Open your endpoint in the dashboard, check Enable Image Optimization, and click Update. The optimization applies to all assets served through that endpoint.

What Gets Optimized

JPEG images Large JPEGs are recompressed at quality 80. Images already well-optimized or below the size threshold are left unchanged. If compression doesn't reduce file size, the original is served.

SVG images SVG files are minified by removing unnecessary whitespace, comments, and metadata.

HTML, CSS, and JavaScript These assets are minified automatically, removing whitespace and comments while preserving functionality.

Automatic Preloading

For HTML pages, Edgelin scans the document and adds Link preload headers for critical resources like stylesheets and scripts. This tells browsers to fetch these assets earlier, improving perceived load time.

Speculative Prefetching

HTML pages are injected with speculation rules that hint browsers to prefetch internal links. When a visitor is likely to click a link (e.g., hovering over it), the browser may start loading that page in advance.

Limitations

  • Only JPEG compression is currently supported. PNG and WebP images are served unchanged.

  • Very small images are skipped since compression overhead outweighs savings.

  • Minification only applies to uncompressed responses. If your origin already serves gzip-compressed assets, they pass through unchanged.

When to Use

Enable this if your origin serves unoptimized assets and you want automatic optimization without modifying your backend. If you already have a build pipeline that optimizes assets, you may not see additional benefit.