PHPackages                             onik/lens-wp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. onik/lens-wp

ActiveWordpress-plugin[Image &amp; Media](/categories/media)

onik/lens-wp
============

ONIK Lens WordPress Plugin — optimizes images and YouTube embeds via the ONIK Lens CDN.

v0.17.260725(1w ago)0207GPL-2.0-or-laterPHPPHP &gt;=8.1

Since Mar 17Pushed 4mo agoCompare

[ Source](https://github.com/ONIK-IO/lens-wp)[ Packagist](https://packagist.org/packages/onik/lens-wp)[ Docs](https://onik.io/wp/lens)[ RSS](/packages/onik-lens-wp/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (5)Dependencies (7)Versions (23)Used By (0)

ONIK Lens - The easiest way to optimize your WordPress images
=============================================================

[](#onik-lens---the-easiest-way-to-optimize-your-wordpress-images)

**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](https://onik.io/wp/lens). Modern formats (AVIF/WebP), tailored sizes (mobile &amp; desktop), and delivery from an edge node closest to the visitor.

Why ONIK Lens?
--------------

[](#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
------------

[](#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 visitor's browser
- **Lightweight &amp; 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 &amp; Sizing** — Configure lazy loading per CSS selector, control how many images load eagerly above the fold, and fine-tune responsive `srcset` breakpoints 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 `` hints for your most critical above-the-fold assets to directly improve your Largest Contentful Paint (LCP) score.

Requirements
------------

[](#requirements)

- WordPress 6.0+
- PHP 8.1+
- An [ONIK Lens](https://onik.io/wp/lens) account ($20 CAD/month, included with ONIK Monitoring, 30-day free trial without account or credit card)

Installation
------------

[](#installation)

### Install in the WordPress Admin

[](#install-in-the-wordpress-admin)

1. [Download the latest release](https://github.com/ONIK-IO/lens-wp/releases/latest/download/onik-lens.zip).
2. In your WordPress admin, go to **Plugins → Add New → Upload Plugin**.
3. Select the downloaded ZIP file and click **Install Now**.
4. Click **Activate Plugin**.

### Install via Composer

[](#install-via-composer)

If you manage your WordPress installation with Composer (e.g. Bedrock or a custom stack):

```
composer require onik/lens-wp
```

The plugin will be installed automatically into your plugins directory via `composer/installers`.

Connect the Plugin to your ONIK Account
---------------------------------------

[](#connect-the-plugin-to-your-onik-account)

The plugin runs in a full-featured **free trial** the moment it's activated — no account or credit card required. To keep it running on a production site, connect it to your ONIK subscription:

1. Log in to [app.onik.io](https://app.onik.io). You will have to create an account and register your site if you have not done so already.
2. Open your site's details.
3. In the left-hand menu, open **Lens Image Optimization**.
4. Copy the site token shown on that page.
5. In WordPress, go to **Settings → ONIK Lens** and find the **Connect to ONIK** panel on the General tab, paste in the token, and click **Connect to ONIK**.

Your tenant, site, and CDN URL are filled in automatically once connected.

Configuration
-------------

[](#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
----------------

[](#more-information)

Full documentation, feature guides, and account setup are available at **[onik.io](https://onik.io/wp/lens)**.

---

License
-------

[](#license)

GPL-2.0-or-later — see [LICENSE](LICENSE)

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance85

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~9 days

Recently: every ~32 days

Total

15

Last Release

13d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ec9f893742854c25b5eae96d5bb3e983036d73b38d281e19c49d683ff46cda57?d=identicon)[viller](/maintainers/viller)

---

Top Contributors

[![viller](https://avatars.githubusercontent.com/u/78535?v=4)](https://github.com/viller "viller (32 commits)")

---

Tags

wordpressyoutubeimagesoptimizationcdn

### Embed Badge

![Health badge](/badges/onik-lens-wp/health.svg)

```
[![Health](https://phpackages.com/badges/onik-lens-wp/health.svg)](https://phpackages.com/packages/onik-lens-wp)
```

###  Alternatives

[wp-media/imagify-plugin

Image optimization plugin for WordPress by WP Media.

8169.4k](/packages/wp-media-imagify-plugin)[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.6k10](/packages/helsingborg-stad-municipio)[wp-media/wp-rocket

Performance optimization plugin for WordPress

7561.4M4](/packages/wp-media-wp-rocket)[mindkomm/timmy

Advanced image manipulation for Timber.

17737.9k](/packages/mindkomm-timmy)[humanmade/gaussholder

Fast and lightweight image previews for WordPress

196120.1k](/packages/humanmade-gaussholder)[bueltge/multisite-global-media

Multisite Global Media is a WordPress plugin which shares media across the Multisite network.

23132.4k](/packages/bueltge-multisite-global-media)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
