Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restrict imgix to specific filetype #33

Open
jacquesletesson opened this issue Jan 20, 2018 · 1 comment
Open

Restrict imgix to specific filetype #33

jacquesletesson opened this issue Jan 20, 2018 · 1 comment

Comments

@jacquesletesson
Copy link

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.

@jacquesletesson
Copy link
Author

jacquesletesson commented Jan 20, 2018

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'] ) ) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant