{"id":13534704,"url":"https://github.com/humanmade/tachyon-plugin","last_synced_at":"2025-04-02T00:30:30.822Z","repository":{"id":51502102,"uuid":"40043234","full_name":"humanmade/tachyon-plugin","owner":"humanmade","description":"WordPress plugin for Tachyon","archived":false,"fork":false,"pushed_at":"2024-06-21T17:04:17.000Z","size":199,"stargazers_count":85,"open_issues_count":16,"forks_count":15,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-03-25T14:45:52.756Z","etag":null,"topics":["aws-lambda","aws-s3","image-processing","wordpress","wordpress-plugin"],"latest_commit_sha":null,"homepage":"https://engineering.hmn.md/projects/tachyon/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/humanmade.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2015-08-01T10:24:20.000Z","updated_at":"2025-01-31T14:43:42.000Z","dependencies_parsed_at":"2024-01-14T02:36:23.376Z","dependency_job_id":"a1657ea7-8e38-4950-ad12-c0b7b1addae6","html_url":"https://github.com/humanmade/tachyon-plugin","commit_stats":{"total_commits":115,"total_committers":12,"mean_commits":9.583333333333334,"dds":0.6956521739130435,"last_synced_commit":"c88848a54608a3fffd2f44d30c8418470ab5a820"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanmade%2Ftachyon-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanmade%2Ftachyon-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanmade%2Ftachyon-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanmade%2Ftachyon-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/humanmade","download_url":"https://codeload.github.com/humanmade/tachyon-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246734817,"owners_count":20825210,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws-lambda","aws-s3","image-processing","wordpress","wordpress-plugin"],"created_at":"2024-08-01T08:00:36.635Z","updated_at":"2025-04-02T00:30:30.566Z","avatar_url":"https://github.com/humanmade.png","language":"PHP","funding_links":[],"categories":["CDN Integration Plugins","PHP"],"sub_categories":[],"readme":"\u003ctable width=\"100%\"\u003e\n\t\u003ctr\u003e\n\t\t\u003ctd align=\"left\" width=\"70\"\u003e\n\t\t\t\u003cstrong\u003eTachyon\u003c/strong\u003e\u003cbr /\u003e\n\t\t\tFaster than light image processing. Inspired / forked from Photon.\n\t\t\u003c/td\u003e\n\t\t\u003ctd align=\"right\" width=\"20%\"\u003e\n\t\t\t\u003ca href=\"https://travis-ci.org/humanmade/tachyon-plugin\"\u003e\n\t\t\t\t\u003cimg src=\"https://travis-ci.org/humanmade/tachyon.svg?branch=master\" alt=\"Build status\"\u003e\n\t\t\t\u003c/a\u003e\n\t\t\t\u003ca href=\"http://codecov.io/github/humanmade/tachyon-plugin?branch=master\"\u003e\n\t\t\t\t\u003cimg src=\"http://codecov.io/github/humanmade/tachyon-plugin/coverage.svg?branch=master\" alt=\"Coverage via codecov.io\" /\u003e\n\t\t\t\u003c/a\u003e\n\t\t\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\t\u003ctd\u003e\n\t\t\tA \u003cstrong\u003e\u003ca href=\"https://hmn.md/\"\u003eHuman Made\u003c/a\u003e\u003c/strong\u003e project. Maintained by @joehoyle.\n\t\t\u003c/td\u003e\n\t\t\u003ctd align=\"center\"\u003e\n\t\t\t\u003cimg src=\"https://hmn.md/content/themes/hmnmd/assets/images/hm-logo.svg\" width=\"100\" /\u003e\n\t\t\u003c/td\u003e\n\t\u003c/tr\u003e\n\u003c/table\u003e\n\n[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.\n\nThis plugin handles modifying WordPress image URLs to use a Tachyon service instance.\n\n## Installation\n\n1. Upload and enable this plugin.\n2. Add `define( 'TACHYON_URL', 'https://your.tachyon.url/path/to/uploads' )` to your `wp-config.php` file.\n\n## Usage\n\nTypically the above steps are all you need to do however you can use the following public facing functions and filters.\n\n### Functions\n\n#### `tachyon_url( string $image_url, array $args = [] )`\n\nThis function returns the Tachyon URL for a given image hosted on Amazon S3.\n\n```php\n$image_url = 'https://my-bucket.s3.us-east-1.amazonaws.com/path/to/image.jpg';\n$args      = [\n\t'resize'  =\u003e '300,300',\n\t'quality' =\u003e 90\n];\n\n$url = tachyon_url( $image_url, $args );\n```\n\n### Filters\n\nThe following filters allow you to modify the output and behaviour of the plugin.\n\n#### `tachyon_disable_in_admin`\n\nDefaults to `true`. You can override this by adding the following code to a plugin or your theme's `functions.php`:\n\n```php\nadd_filter( 'tachyon_disable_in_admin', '__return_false' );\n```\n\n#### `tachyon_override_image_downsize`\n\nDefaults 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.\n\n```php\nadd_filter( 'tachyon_override_image_downsize', '__return_true' );\n```\n\n#### `tachyon_skip_for_url`\n\nAllows skipping the Tachyon URL for a given image URL. Defaults to `false`.\n\n```php\nadd_filter( 'tachyon_skip_for_url', function ( $skip, $image_url, $args ) {\n\tif ( strpos( $image_url, 'original' ) !== false ) {\n\t\treturn true;\n\t}\n\t\n\treturn $skip;\n}, 10, 3 );\n```\n\n#### `tachyon_pre_image_url`\n\nFilters 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.\n\n```php\nadd_filter( 'tachyon_pre_image_url', function ( $image_url, $args ) {\n\tif ( rand( 1, 2 ) === 2 ) {\n\t\t$image_url = str_replace( TACHYON_URL, TACHYON_URL_2, $image_url );\n\t}\n\t\n\treturn $image_url;\n}, 10, 2 );\n```\n\n#### `tachyon_pre_args`\n\nFilters the query string parameters appended to the tachyon image URL.\n\n```php\nadd_filter( 'tachyon_pre_args', function ( $args ) {\n\tif ( isset( $args['resize'] ) ) {\n\t\t$args['crop_strategy'] = 'smart';\n\t}\n\t\n\treturn $args;\n} );\n```\n\n#### `tachyon_remove_size_attributes`\n\nDefaults to `true`. `width` \u0026 `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.\n\n\n```php\nadd_filter( 'tachyon_remove_size_attributes', '__return_true' );\n```\n\n## Credits\nCreated 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.\n\nWritten and maintained by [Joe Hoyle](https://github.com/joehoyle).\n\nTachyon 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.\n\nInterested in joining in on the fun? [Join us, and become human!](https://hmn.md/is/hiring/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumanmade%2Ftachyon-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhumanmade%2Ftachyon-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumanmade%2Ftachyon-plugin/lists"}