Download the PHP package rsoury/wp-imgix without Composer
On this page you can find all versions of the php package rsoury/wp-imgix. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rsoury/wp-imgix
More information about rsoury/wp-imgix
Files in rsoury/wp-imgix
Package wp-imgix
Short Description Rewrites WordPress image URLs to use ImgIX
License GPL-2.0
Informations about the package wp-imgix
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
- Download the zipped main branch of this plugin from github.
- Extract the plugin to your
plugins
folder. - Enable the plugin.
- Add
define( 'WP_IMGIX_URL', 'your.imgix.net' )
to yourwp-config.php
file. - If you're signing urls, Add
define( 'WP_IMGIX_SIGNING_TOKEN', 'abcdefg123456' )
to yourwp-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
imgix_url( string $image_url, 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.
imgix_disable_in_admin
Defaults to true
.
imgix_override_image_downsize
Defaults to false
. Provides a way of preventing ImgIX from being applied to images retrieved from WordPress Core at the lowest level, you might use this if you wanted to use imgix_url()
manually in specific cases.
imgix_skip_for_url
Allows skipping the ImgIX URL for a given image URL. Defaults to false
.
imgix_pre_image_url
Filters the ImgIX image URL excluding the query string arguments.
imgix_pre_args
Filters the query string parameters appended to the imgix image URL.
imgix_remove_size_attributes
Defaults to true
. width
& 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.
Credits
Created by Web Doodle
Forked from HumanMade's Tachyon Plugin -- Special thanks to the HumanMade team for working on accelerated Wordpress projects.
Written and maintained by Ryan Soury.