images-via-imgix
images-via-imgix copied to clipboard
Restrict imgix to specific filetype
On numerous project we use animated-gif within Wordpress.
The plugin currently replace every images (despite the filetype) with Imgix instance.
Knowing that animated gif support is still a beta feature of Imgix, it would be awesome to have some sort of filetype restriction within the administration panel.
Right now, we hacked our way into the plugin to avoid any disturbance.
Basically we edited line 98 of class-images-via-imgix.php
into this :
if ( isset( $parsed_url['host'], $parsed_url['path'] ) && $parsed_url['host'] === parse_url( home_url( '/' ), PHP_URL_HOST ) && preg_match( '/\.(jpg|jpeg|png)$/', $parsed_url['path'] ) ) {