diff --git a/compressors/PdfCompressor.php b/compressors/PdfCompressor.php index 367911c..0519ef7 100644 --- a/compressors/PdfCompressor.php +++ b/compressors/PdfCompressor.php @@ -43,7 +43,11 @@ class PdfCompressor extends Compressor public function originalSize(): array { - return getimagesize($this->extractImage($this->media->root())); + $filename = $this->extractImage($this->media->root()); + $size = getimagesize($filename); + @unlink($file); + + return $size; } public function shouldGenerateVersions(): bool