• Resolved lelouchryu

    (@lelouchryu)


    Hi i wanna know if theres any way to disable photon for gifs, it is great for jpg images, but gifs sometimes apperas break i also use upscaled gifs sometimes to create certain gallerys and the plugin make the gifs appear scaled breaking the simetry of the composition.

    Maybe theres some function i can put on my theme to make photon ignore the gifs or act only on jpg’s (that would be even better).

    https://www.ads-software.com/extend/plugins/jetpack/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    You could build you own function and use the jetpack_photon_skip_image filter to skip some of your images. Here is a super basic example:

    // Skip a image with Photon
    function tweakjp_photon_exception( $skip, $src ) {
            if ( $src == 'YOUR_IMAGE_URL' ) {
                    return true;
            }
            return $skip;
    }
    add_filter( 'jetpack_photon_skip_image', 'tweakjp_photon_exception', 10, 3 );
    Thread Starter lelouchryu

    (@lelouchryu)

    Worked, many tanks for the tip.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Disable Photon for gifs’ is closed to new replies.