Sets a custom cURL timeout when the WP default is too short in Imagify

Sets a custom cURL timeout when the WP default is too short in Imagify on child sites.

Snippet Type

Execute on Child Sites

Snippet

declare( strict_types=1 );

add_action( 'http_api_curl', function( $handle ) {
    curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, 10000 );
    curl_setopt( $handle, CURLOPT_TIMEOUT, 10000 );
}, 1000 );

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.