Fix: Fetch compressor only once
This commit is contained in:
parent
328e3784c1
commit
f38a63e1f2
|
@ -89,8 +89,10 @@ class MediaPath
|
|||
{
|
||||
$return = collect([]);
|
||||
|
||||
$extensionRegex = $this->compressor()->getExtensionRegex();
|
||||
|
||||
foreach (Storage::files($this->versionsDirPath()) as $file) {
|
||||
if (!preg_match_all('|('.preg_quote($this->filename(), '|').')(-[0-9]+x[0-9]+)?(\.'.$this->compressor()->getExtensionRegex().'+)$|', $file, $matches)) {
|
||||
if (!preg_match_all('|('.preg_quote($this->filename(), '|').')(-[0-9]+x[0-9]+)?(\.'.$extensionRegex.'+)$|', $file, $matches)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue