Throw exception if resized image cannot be found before compression
This commit is contained in:
parent
1bd0dff59b
commit
f7e7e46c02
|
@ -93,6 +93,9 @@ class ImageResizer
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($this->file->versions() as $version) {
|
foreach ($this->file->versions() as $version) {
|
||||||
|
if (!$this->disk->exists($version->get('path'))) {
|
||||||
|
throw new ResizerException('File versions cannot be generated. Version file "'.$version->get('path').'" of "'.$this->file->root().'" doesnt exist.');
|
||||||
|
}
|
||||||
$this->file->compressor()->make($this->disk->path($version->get('path')));
|
$this->file->compressor()->make($this->disk->path($version->get('path')));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue