WP ImgIX
Rewrites WordPress image URLs to use ImgIX
★ 16stars
7.2kcomposer installs
5forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/rsoury/wp-imgix/archive/refs/heads/master.zipAlso on Packagist as rsoury/wp-imgix:
composer require rsoury/wp-imgixFrom the readme
WP ImgIX is a Wordpress Plugin to automatically load all your existing (and future) WordPress images via the imgix service for smaller, faster, and better looking images.
This plugin handles modifying WordPress image URLs to use the ImgIX service.
It works very well with S3-Uploads
Installation
1. Download the zipped main branch of this plugin from github.
2. Extract the plugin to your plugins folder.
3. Enable the plugin.
4. Add define( 'WPIMGIXURL', 'your.imgix.net' ) to your wp-config.php file.
5. If you're signing urls, Add define( 'WPIMGIXSIGNINGTOKEN', 'abcdefg123456' ) to your wp-config.php file.
Usage
Typically the above steps are all you need to do however you can use the following public facing functions and filters.
Functions
imgixurl( string $imageurl, array $args = [] )
This function returns the ImgIX URL for a given image.
Filters
The following filters allow you to modify the output and behaviour of the plugin. The filters below can be added to your theme's functions.php to modify the behavior of your imgix URLs.
imgixdisableinadmin
Defaults to true.
imgixoverrideimagedownsize
Defaults to false. Provides a way of preventing ImgIX from being applied to im