PHPackages                             humanmade/gaussholder - 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. humanmade/gaussholder

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

humanmade/gaussholder
=====================

Fast and lightweight image previews for WordPress

1.1.6(3y ago)196119.7k15[6 issues](https://github.com/humanmade/Gaussholder/issues)[3 PRs](https://github.com/humanmade/Gaussholder/pulls)GPL-2.0-or-laterPHPPHP &gt;=5.3

Since Mar 8Pushed 2y ago21 watchersCompare

[ Source](https://github.com/humanmade/Gaussholder)[ Packagist](https://packagist.org/packages/humanmade/gaussholder)[ RSS](/packages/humanmade-gaussholder/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (1)Versions (13)Used By (0)

   **Gaussholder**
 Fast and lightweight image previews, using Gaussian blur.       A **[Human Made](https://hmn.md/)** project. Maintained by @rmccue.   [![](https://camo.githubusercontent.com/21ddd8db8af0243ccabd437a33ded6e2da1e9777d1b4d75f30ab9ac80803c90a/68747470733a2f2f686d6e2e6d642f636f6e74656e742f7468656d65732f686d6e6d642f6173736574732f696d616765732f686d2d6c6f676f2e737667)](https://camo.githubusercontent.com/21ddd8db8af0243ccabd437a33ded6e2da1e9777d1b4d75f30ab9ac80803c90a/68747470733a2f2f686d6e2e6d642f636f6e74656e742f7468656d65732f686d6e6d642f6173736574732f696d616765732f686d2d6c6f676f2e737667)  Gaussholder is an image placeholder utility, generating accurate preview images using an amazingly small amount of data.

[![](preview.gif)](preview.gif)

That's a **800 byte** preview image, for a **109 kilobyte** image. 800 bytes still too big? Tune the size to your liking in your configuration.

**Please note:** This is still in development, and we're working on getting this production-ready, so things might not be settled yet. In particular, we're still working on tweaking the placeholder size and improving the lazyloading code. Avoid using this in production.

How does it work?
-----------------

[](#how-does-it-work)

Gaussholder is inspired by [Facebook Engineering's fantastic post](https://code.facebook.com/posts/991252547593574) on generating tiny preview images. Gaussholder takes the concepts from this post and applies them to the wild world of WordPress.

In a nutshell, Gaussholder takes a Gaussian blur and applies it to an image to generate a preview image. Gaussian blurs work as a low-pass filter, allowing us to throw away a lot of the data. We then further reduce the amount of data per image by removing the JPEG header and rebuilding it on the client side (this eliminates ~800 bytes from each image).

We further reduce the amount of data for some requests by lazyloading images.

How do I use it?
----------------

[](#how-do-i-use-it)

Gaussholder is designed for high-volume sites for seriously advanced users. Do *not* install this on your regular WP site.

1. Download and activate the plugin from this repo.
2. Select the image sizes to use Gaussholder on, and add them to the array on the `gaussholder.image_sizes` filter.
3. If you have existing images, regenerate the image thumbnails.

Your filter should look something like this:

```
add_filter( 'gaussholder.image_sizes', function ( $sizes ) {
	$sizes['medium'] = 16;
	$sizes['large'] = 32;
	$sizes['full'] = 84;
	return $sizes;
} );
```

The keys are registered image sizes (plus `full` for the original size), with the value as the desired blur radius in pixels.

By default, Gaussholder won't generate any placeholders, and you need to opt-in to using it. Simply filter here, and add the size names for what you want generated.

Be aware that for every size you add, a placeholder will be generated and stored in the database. If you have a lot of sizes, this will be a *lot* of data.

By default Gaussholder is initialized with the `DOMContentLoaded` event. Should you need to reinitialize Gaussholder after the page had loaded, this can be achieved with `GaussHolder();`.

### Blur radius

[](#blur-radius)

The blur radius controls how much blur we use. The image is pre-scaled down by this factor, and this is really the key to how the placeholders work. Increasing radius decreases the required data quadratically: a radius of 2 uses a quarter as much data as the full image; a radius of 8 uses 1/64 the amount of data. (Due to compression, the final result will *not* follow this scaling.)

Be careful tuning this, as decreasing the radius too much will cause a huge amount of data in the body; increasing it will end up with not enough data to be an effective placeholder.

The radius needs to be tuned to each size individually. Facebook uses about 200 bytes of data for their placeholders, but you may want higher quality placeholders. There's no ideal radius, as you simply want to balance having a useful placeholder with the extra time needed to process the data on the page.

Gaussholder includes a CLI command to help you tune the radius: pick a representative attachment or image file and use `wp gaussholder check-size  `. Adjust the radius until you get to roughly 200B, then check against other attachments to ensure they're in the ballpark.

Note: changing the radius requires regenerating the placeholder data. Run `wp gaussholder process-all --regenerate` after changing radii or adding new sizes.

License
-------

[](#license)

Gaussholder is licensed under the GPLv2 or later.

Gaussholder uses StackBlur, licensed under the MIT license.

See [LICENSE.md](LICENSE.md) for further details.

Credits
-------

[](#credits)

Created by Human Made for high volume and large-scale sites.

Written and maintained by [Ryan McCue](https://github.com/rmccue). Thanks to all our [contributors](https://github.com/humanmade/Gaussholder/graphs/contributors). (Thanks also to fellow humans Matt and Paul for the initial placeholder code.)

Gaussholder is heavily inspired by [Facebook Engineering's post](https://code.facebook.com/posts/991252547593574), and would not have been possible without it. In particular, the techniques of downscaling before blurring and extracting the JPEG header are particularly novel, and the key to why Gaussholder exists.

Interested in joining in on the fun? [Join us, and become human!](https://hmn.md/is/hiring/)

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity47

Moderate usage in the ecosystem

Community27

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor3

3 contributors hold 50%+ of commits

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 ~411 days

Recently: every ~324 days

Total

6

Last Release

1300d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/21655?v=4)[Ryan McCue](/maintainers/rmccue)[@rmccue](https://github.com/rmccue)

![](https://www.gravatar.com/avatar/77dbeefb7745010589603f2ffc6ff310d8f700b58e08d52af190744c43342526?d=identicon)[roborourke](/maintainers/roborourke)

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

---

Top Contributors

[![rmccue](https://avatars.githubusercontent.com/u/21655?v=4)](https://github.com/rmccue "rmccue (36 commits)")[![igmoweb](https://avatars.githubusercontent.com/u/1516569?v=4)](https://github.com/igmoweb "igmoweb (28 commits)")[![roborourke](https://avatars.githubusercontent.com/u/23417?v=4)](https://github.com/roborourke "roborourke (24 commits)")[![joehoyle](https://avatars.githubusercontent.com/u/161683?v=4)](https://github.com/joehoyle "joehoyle (16 commits)")[![mattheu](https://avatars.githubusercontent.com/u/494927?v=4)](https://github.com/mattheu "mattheu (12 commits)")[![goldenapples](https://avatars.githubusercontent.com/u/665992?v=4)](https://github.com/goldenapples "goldenapples (9 commits)")[![pdewouters](https://avatars.githubusercontent.com/u/30460?v=4)](https://github.com/pdewouters "pdewouters (7 commits)")[![swissspidy](https://avatars.githubusercontent.com/u/841956?v=4)](https://github.com/swissspidy "swissspidy (6 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![mikelittle](https://avatars.githubusercontent.com/u/358499?v=4)](https://github.com/mikelittle "mikelittle (4 commits)")[![zloymalefic](https://avatars.githubusercontent.com/u/5164061?v=4)](https://github.com/zloymalefic "zloymalefic (3 commits)")[![tcrsavage](https://avatars.githubusercontent.com/u/907521?v=4)](https://github.com/tcrsavage "tcrsavage (1 commits)")[![noeltock](https://avatars.githubusercontent.com/u/781166?v=4)](https://github.com/noeltock "noeltock (1 commits)")

---

Tags

pluginwordpressimages

### Embed Badge

![Health badge](/badges/humanmade-gaussholder/health.svg)

```
[![Health](https://phpackages.com/badges/humanmade-gaussholder/health.svg)](https://phpackages.com/packages/humanmade-gaussholder)
```

###  Alternatives

[wp-sync-db/wp-sync-db-media-files

WP Sync DB Media File Addon for WP Sync DB

535151.4k](/packages/wp-sync-db-wp-sync-db-media-files)[mindkomm/timmy

Advanced image manipulation for Timber.

17735.6k](/packages/mindkomm-timmy)[wp-media/imagify-plugin

Image optimization plugin for WordPress by WP Media.

7960.9k](/packages/wp-media-imagify-plugin)[viper007bond/regenerate-thumbnails

Regenerate the thumbnails for one or more of your image uploads. Useful when changing their sizes or your theme.

14012.2k](/packages/viper007bond-regenerate-thumbnails)[frozzare/wp-glide

Simple integration of Glide with WordPress

185.3k](/packages/frozzare-wp-glide)

PHPackages © 2026

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