Once you activate the Site Accelerator module, it will automatically cache and serve all images you’ve added to your posts and pages that have been uploaded to your site.
You can exclude a specific image or an entire page from Site Accelerator easily.
To exclude an entire post or page from using Site Accelerator, you can modify this snippet to fit your needs and add it to your theme’s functions.php or a core functionality plugin:
function no_photon_by_page() { if ( is_page( 2 ) ) { add_filter( 'jetpack_photon_skip_image', '__return_true'); } } add_action('wp', 'no_photon_by_page');
In this example, Site Accelerator won’t be used on the page with the ID of 2, but you can use any of the WordPress Conditional Functions.
If you’d like to exclude an image from being cached and served by Site Accelerator, you can add the following code to your theme’s functions.php file:
function my_photon_exception( $val, $src, $tag ) { if ( $src == 'YOUR_IMAGE_URL' ) { return true; } return $val; } add_filter( 'jetpack_photon_skip_image', 'my_photon_exception', 10, 3 );
If you’d like to disable Site Accelerator in other specific situations instead, you can check this tutorial.
Explore the benefits of Jetpack
Learn how Jetpack can help you protect, speed up, and grow your WordPress site.
Get up to 50% off your first year.
Compare plans