• Resolved consumerista

    (@consumerista)


    Hey all. I hope this finds you well.

    I have the Site Optimizer installed but I disabled “Speed up image load times.” In this article, Jetpack offers some sample code to disable image compression (default value is 90):

    `function sa_custom_params( $args ) {
    $args[‘quality’] = 100;

    return $args;
    }
    add_filter( ‘jetpack_photon_pre_args’, ‘sa_custom_params’ );`

    Would I just copy and paste this exact code in my PHP functions file? I’ve edited a lot of CSS but never messed with PHP so I wanted to be sure. I have Jetpack backup so I’m not worried about that FYI.

    Another related question. Will having “speed up static file load times,” which I have active, make much a difference?

    I use Fastest Cache, server based in East Coast US. Works great and have had no issues with Jetpack static file enabled. Load time is quite good in the US but wanted to enabled the CDN for overseas traffic. There’s maybe one image per article on average. Not that large. But the image quality gets reduced drastically with the speed image load time enabled.

    Thanks

    • This topic was modified 2 years, 11 months ago by consumerista.
    • This topic was modified 2 years, 11 months ago by consumerista.
    • This topic was modified 2 years, 11 months ago by consumerista.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter consumerista

    (@consumerista)

    This is actually the correct code. Not letting me edit.

    function sa_custom_params( $args ) {
    $args[‘quality’] = 100;

    return $args;
    }
    add_filter( ‘jetpack_photon_pre_args’, ‘sa_custom_params’ );`

    Plugin Support lastsplash (a11n)

    (@lastsplash)

    Hi @consumerista

    To add the code to your site, we recommend using a functionality plugin like Code Snippets to add the code to your site. Using a plugin will make it so you don’t have to edit PHP files and will allow the changes to persist if you change themes.

    Will having “speed up static file load times,” which I have active, make much a difference?

    Without knowing your URL it is hard to say. I would recommend testing in a speed test tool (such as GTmetrix.com) with it on and with it off to get a sense of whether or not it helps on your site.

    Please note that it only acts on assets shipped with WordPress core, Jetpack, and WooCommerce. Theme and plugin assets are not supported at this time.

    Thread Starter consumerista

    (@consumerista)

    I plugged in the code. Unfortunately, it still reduces the quality of the images substantially even when set to “100”.

    I wonder if this is something they are going to work on?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Jetpack Site Accelerator Disable Image Compression’ is closed to new replies.