onik / lens-wp
ONIK Lens WordPress Plugin — optimizes images and YouTube embeds via the ONIK Lens CDN.
Requires
- composer/installers: ^1.0 || ^2.0
- symfony/css-selector: ^6.0
This package is auto-updated.
Last update: 2026-03-19 17:40:42 UTC
README
Boost your Google PageSpeed score and pass Core Web Vitals — without touching a single file in your Media Library.
ONIK Lens optimizes every image and YouTube embed on your site and serves them through the ONIK Lens CDN. Modern formats (AVIF/WebP), tailored sizes (mobile & desktop), and delivery from an edge node closest to the visitor.
Why ONIK Lens?
Slow images are the primary reason WordPress sites fail Core Web Vitals like Largest Contentful Paint (LCP). Many image optimization techniques permanently convert your media. ONIK Lens takes a different approach: your original files stay completely untouched. Optimization happens on our edge nodes, saving your server's CPU, disk space, and bandwidth.
Key Features
- Instant results — activate and your images are immediately served in the right format, at the right size (mobile or desktop), and from the edge.
- Modern Formats AVIF, WebP, JPEG — Automatically uses the most efficient format supported by your visitors browsers
- Lightweight & fast — no image processing on your server, no bloated libraries, no background jobs. All the heavy lifting is offloaded to the edge so your server stays fast and lean.
- Non-destructive — your WordPress Media Library is never modified; uninstall by simply deactivating the plugin
- Works everywhere — optimizes images in media, theme assets, Sliders, page builders (Elementor, Divi, Beaver Builder, and more), and any HTML on the page
- Full Control of Lazy Load & Sizing — Configure lazy loading per CSS selector, control how many images load eagerly above the fold, and fine-tune responsive
srcsetbreakpoints to match your design — all from the settings panel. - YouTube Facade — Replaces YouTube embeds with a lightweight screenshot placeholder. The player only loads on click, eliminating the ~500 KB embed penalty on first load — and passing Google Lighthouse's "Facade your YouTube embeds" recommendation.
- Site Preloads for LCP — Inject
<link rel="preload">hints for your most critical above-the-fold assets to directly improve your Largest Contentful Paint (LCP) score.
Requirements
- WordPress 6.0+
- PHP 8.0+
- An ONIK Lens account (free trial available)
Installation
Install in the WordPress Admin
- Download the latest release ZIP from the GitHub Releases page.
- In your WordPress admin, go to Plugins → Add New → Upload Plugin.
- Select the downloaded ZIP file and click Install Now.
- Click Activate Plugin.
Install via Composer
If you manage your WordPress installation with Composer (e.g. Bedrock or a custom stack):
composer require onik/onik-lens
The plugin will be installed automatically into your plugins directory via composer/installers.
Configuration
Default settings will work great right out of the box. Tailor the settings in the WordPress admin under Settings → ONIK Lens.
No PHP configuration, no wp-config.php constants, and no manual file edits are required.
More Information
Full documentation, feature guides, and account setup are available at onik.io.
License
GPL-2.0-or-later — see LICENSE