Skip to content

Commit

Permalink
performance fix
Browse files Browse the repository at this point in the history
drop getimagesize call to prevent timeouts
  • Loading branch information
matdave authored Sep 2, 2021
1 parent 316a842 commit 6a0d422
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -474,11 +474,13 @@ public function getObjectsInContainer($path)
$thumbWidth = $this->ctx->getOption('filemanager_thumb_width', 100);
$thumbHeight = $this->ctx->getOption('filemanager_thumb_height', 80);

/* Drop this for performance
breaks image size output, but MUCH more stable
$size = @getimagesize($url);
if (is_array($size)) {
$imageWidth = $size[0] > 800 ? 800 : $size[0];
$imageHeight = $size[1] > 600 ? 600 : $size[1];
}
}*/

if ($thumbWidth > $imageWidth) $thumbWidth = $imageWidth;
if ($thumbHeight > $imageHeight) $thumbHeight = $imageHeight;
Expand Down

0 comments on commit 6a0d422

Please sign in to comment.