PHPackages                             humanmade/tachyon-plugin - 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/tachyon-plugin

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

humanmade/tachyon-plugin
========================

Rewrites WordPress image URLs to use Tachyon

0.11.10(10mo ago)87362.7k↓25.1%16[17 issues](https://github.com/humanmade/tachyon-plugin/issues)2GPL-3.0PHPCI failing

Since Sep 19Pushed 5mo ago17 watchersCompare

[ Source](https://github.com/humanmade/tachyon-plugin)[ Packagist](https://packagist.org/packages/humanmade/tachyon-plugin)[ RSS](/packages/humanmade-tachyon-plugin/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (2)Versions (21)Used By (2)

   **Tachyon**
 Faster than light image processing. Inspired / forked from Photon.   [ ![Build status](https://camo.githubusercontent.com/1fbc386ab87d54f1d7339b45aec339e56164d0a1d6f3cffcb27b8568ccf5613a/68747470733a2f2f7472617669732d63692e6f72672f68756d616e6d6164652f74616368796f6e2e7376673f6272616e63683d6d6173746572) ](https://travis-ci.org/humanmade/tachyon-plugin) [ ![Coverage via codecov.io](https://camo.githubusercontent.com/e7aa02bd40647b163cabe8a1fa28468addbb5a63c2b6b71c3f7e90214c036470/687474703a2f2f636f6465636f762e696f2f6769746875622f68756d616e6d6164652f74616368796f6e2d706c7567696e2f636f7665726167652e7376673f6272616e63683d6d6173746572) ](http://codecov.io/github/humanmade/tachyon-plugin?branch=master)     A **[Human Made](https://hmn.md/)** project. Maintained by @joehoyle.   [![](https://camo.githubusercontent.com/21ddd8db8af0243ccabd437a33ded6e2da1e9777d1b4d75f30ab9ac80803c90a/68747470733a2f2f686d6e2e6d642f636f6e74656e742f7468656d65732f686d6e6d642f6173736574732f696d616765732f686d2d6c6f676f2e737667)](https://camo.githubusercontent.com/21ddd8db8af0243ccabd437a33ded6e2da1e9777d1b4d75f30ab9ac80803c90a/68747470733a2f2f686d6e2e6d642f636f6e74656e742f7468656d65732f686d6e6d642f6173736574732f696d616765732f686d2d6c6f676f2e737667)  [Tachyon](https://github.com/humanmade/tachyon) is an image resizing service built to be used with Amazon S3 as the image backend, AWS Lambda (or any node.js server) to process images using [sharp](http://sharp.pixelplumbing.com/en/stable/), and sits behind a CDN such as CloudFront or CloudFlare.

This plugin handles modifying WordPress image URLs to use a Tachyon service instance.

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

[](#installation)

1. Upload and enable this plugin.
2. Add `define( 'TACHYON_URL', 'https://your.tachyon.url/path/to/uploads' )` to your `wp-config.php` file.

Usage
-----

[](#usage)

Typically the above steps are all you need to do however you can use the following public facing functions and filters.

### Functions

[](#functions)

#### `tachyon_url( string $image_url, array $args = [] )`

[](#tachyon_url-string-image_url-array-args---)

This function returns the Tachyon URL for a given image hosted on Amazon S3.

```
$image_url = 'https://my-bucket.s3.us-east-1.amazonaws.com/path/to/image.jpg';
$args      = [
	'resize'  => '300,300',
	'quality' => 90
];

$url = tachyon_url( $image_url, $args );
```

### Filters

[](#filters)

The following filters allow you to modify the output and behaviour of the plugin.

#### `tachyon_disable_in_admin`

[](#tachyon_disable_in_admin)

Defaults to `true`. You can override this by adding the following code to a plugin or your theme's `functions.php`:

```
add_filter( 'tachyon_disable_in_admin', '__return_false' );
```

#### `tachyon_override_image_downsize`

[](#tachyon_override_image_downsize)

Defaults to `false`. Provides a way of preventing Tachyon from being applied to images retrieved from WordPress Core at the lowest level, you might use this if you wanted to use `tachyon_url()` manually in specific cases.

```
add_filter( 'tachyon_override_image_downsize', '__return_true' );
```

#### `tachyon_skip_for_url`

[](#tachyon_skip_for_url)

Allows skipping the Tachyon URL for a given image URL. Defaults to `false`.

```
add_filter( 'tachyon_skip_for_url', function ( $skip, $image_url, $args ) {
	if ( strpos( $image_url, 'original' ) !== false ) {
		return true;
	}

	return $skip;
}, 10, 3 );
```

#### `tachyon_pre_image_url`

[](#tachyon_pre_image_url)

Filters the Tachyon image URL excluding the query string arguments. You might use this to shard Tachyon requests across multiple instances of the service for example.

```
add_filter( 'tachyon_pre_image_url', function ( $image_url, $args ) {
	if ( rand( 1, 2 ) === 2 ) {
		$image_url = str_replace( TACHYON_URL, TACHYON_URL_2, $image_url );
	}

	return $image_url;
}, 10, 2 );
```

#### `tachyon_pre_args`

[](#tachyon_pre_args)

Filters the query string parameters appended to the tachyon image URL.

```
add_filter( 'tachyon_pre_args', function ( $args ) {
	if ( isset( $args['resize'] ) ) {
		$args['crop_strategy'] = 'smart';
	}

	return $args;
} );
```

#### `tachyon_remove_size_attributes`

[](#tachyon_remove_size_attributes)

Defaults to `true`. `width` &amp; `height` attributes on image tags are removed by default to prevent aspect ratio distortion that can happen in some unusual cases where `srcset` sizes have different aspect ratios.

```
add_filter( 'tachyon_remove_size_attributes', '__return_true' );
```

Credits
-------

[](#credits)

Created by Human Made for high volume and large-scale sites, such as [Happytables](http://happytables.com/). We run Tachyon on sites with millions of monthly page views, and thousands of sites.

Written and maintained by [Joe Hoyle](https://github.com/joehoyle).

Tachyon is forked from Photon by Automattic Inc. As Tachyon is not an all-purpose image resizer, rather it uses a media library in Amazon S3, it has a different use case to Photon.

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

###  Health Score

54

—

FairBetter than 96% of packages

Maintenance59

Moderate activity, may be stable

Popularity51

Moderate usage in the ecosystem

Community35

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor2

2 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 ~179 days

Recently: every ~251 days

Total

15

Last Release

328d 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)

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

---

Top Contributors

[![roborourke](https://avatars.githubusercontent.com/u/23417?v=4)](https://github.com/roborourke "roborourke (69 commits)")[![joehoyle](https://avatars.githubusercontent.com/u/161683?v=4)](https://github.com/joehoyle "joehoyle (41 commits)")[![peterwilsoncc](https://avatars.githubusercontent.com/u/519727?v=4)](https://github.com/peterwilsoncc "peterwilsoncc (40 commits)")[![mikelittle](https://avatars.githubusercontent.com/u/358499?v=4)](https://github.com/mikelittle "mikelittle (4 commits)")[![rmccue](https://avatars.githubusercontent.com/u/21655?v=4)](https://github.com/rmccue "rmccue (3 commits)")[![kadamwhite](https://avatars.githubusercontent.com/u/442115?v=4)](https://github.com/kadamwhite "kadamwhite (2 commits)")[![wisyhambolu](https://avatars.githubusercontent.com/u/22037320?v=4)](https://github.com/wisyhambolu "wisyhambolu (1 commits)")[![wvega](https://avatars.githubusercontent.com/u/45068?v=4)](https://github.com/wvega "wvega (1 commits)")[![wwahammy](https://avatars.githubusercontent.com/u/94169?v=4)](https://github.com/wwahammy "wwahammy (1 commits)")[![brendanlawton](https://avatars.githubusercontent.com/u/10241756?v=4)](https://github.com/brendanlawton "brendanlawton (1 commits)")[![zloymalefic](https://avatars.githubusercontent.com/u/5164061?v=4)](https://github.com/zloymalefic "zloymalefic (1 commits)")[![goldenapples](https://avatars.githubusercontent.com/u/665992?v=4)](https://github.com/goldenapples "goldenapples (1 commits)")[![Japh](https://avatars.githubusercontent.com/u/237905?v=4)](https://github.com/Japh "Japh (1 commits)")[![pdewouters](https://avatars.githubusercontent.com/u/30460?v=4)](https://github.com/pdewouters "pdewouters (1 commits)")[![sambulance](https://avatars.githubusercontent.com/u/5014023?v=4)](https://github.com/sambulance "sambulance (1 commits)")[![svandragt](https://avatars.githubusercontent.com/u/594871?v=4)](https://github.com/svandragt "svandragt (1 commits)")

---

Tags

aws-lambdaaws-s3image-processingwordpresswordpress-plugin

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[goat1000/svggraph

Generates SVG graphs

135911.1k3](/packages/goat1000-svggraph)[gravatarphp/gravatar

Gravatar URL builder which is most commonly called as a Gravatar library

16653.6k2](/packages/gravatarphp-gravatar)[rsoury/wp-imgix

Rewrites WordPress image URLs to use ImgIX

167.2k](/packages/rsoury-wp-imgix)

PHPackages © 2026

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