Skip to content

Commit

Permalink
Merge pull request #754 from 10up/fix/708
Browse files Browse the repository at this point in the history
fix/708: fixes issue with processing `.png` images with large file sizes.
  • Loading branch information
dkotter authored Apr 2, 2024
2 parents 4d91802 + a90aef4 commit 35c6e4b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions includes/Classifai/Providers/Azure/ComputerVision.php
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,22 @@ protected function scan_image( string $image_url, \Classifai\Features\Feature $f
'Ocp-Apim-Subscription-Key' => $settings['api_key'],
'Content-Type' => 'application/json',
],
/**
* Filters the timeout for the image scan request.
*
* Default: 60 seconds.
*
* @since 3.1.0
* @hook classifai_ms_computer_vision_scan_image_timeout
*
* @param {int} $timeout Timeout in seconds.
*
* @return {int} Timeout in seconds.
*/
'timeout' => apply_filters(
'classifai_' . self::ID . '_scan_image_timeout',
60
),
'body' => '{"url":"' . $image_url . '"}',
]
);
Expand Down

0 comments on commit 35c6e4b

Please sign in to comment.