Skip to content

Commit

Permalink
tec: Limit size of illustrations to 5 Mo
Browse files Browse the repository at this point in the history
Too large images take a lot of place in memory and can exhaust the max
allowed memory size.
  • Loading branch information
marienfressinaud committed Jul 28, 2023
1 parent 0646a3d commit ae56a29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function generatePreviews(string $image_url): string
models\FetchLog::log($image_url, 'image');
try {
$options = [
'max_size' => 20 * 1024 * 1024,
'max_size' => 5 * 1024 * 1024,
];
$response = $this->http->get($image_url, [], $options);
} catch (\SpiderBits\HttpError $e) {
Expand Down

0 comments on commit ae56a29

Please sign in to comment.