function my_photon_exception( $val, $src, $tag ) { if (strpos($src, '/plugins/location-weather-pro/') !== false || strpos($src, 'openweathermap.org/img') !== false ) { return true; } return $val; } add_filter( 'jetpack_photon_skip_image', 'my_photon_exception', 10, 3 );