Skip to content

Commit 35c6e4b

Browse files
authored
Merge pull request #754 from 10up/fix/708
fix/708: fixes issue with processing `.png` images with large file sizes.
2 parents 4d91802 + a90aef4 commit 35c6e4b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

includes/Classifai/Providers/Azure/ComputerVision.php

+16
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,22 @@ protected function scan_image( string $image_url, \Classifai\Features\Feature $f
610610
'Ocp-Apim-Subscription-Key' => $settings['api_key'],
611611
'Content-Type' => 'application/json',
612612
],
613+
/**
614+
* Filters the timeout for the image scan request.
615+
*
616+
* Default: 60 seconds.
617+
*
618+
* @since 3.1.0
619+
* @hook classifai_ms_computer_vision_scan_image_timeout
620+
*
621+
* @param {int} $timeout Timeout in seconds.
622+
*
623+
* @return {int} Timeout in seconds.
624+
*/
625+
'timeout' => apply_filters(
626+
'classifai_' . self::ID . '_scan_image_timeout',
627+
60
628+
),
613629
'body' => '{"url":"' . $image_url . '"}',
614630
]
615631
);

0 commit comments

Comments
 (0)