Fix issue where resized images were not correctly identified as already having been resized when atomic (blue/green) deployment strategies are used in conjunction with files being stored on the local filesystem in a shared symlinked storage folder.
This commit is contained in:
parent
618e2b58ab
commit
fe2ca6c15e
|
|
@ -219,9 +219,21 @@ class ImageResizer
|
||||||
*/
|
*/
|
||||||
public function getConfig()
|
public function getConfig()
|
||||||
{
|
{
|
||||||
|
$disk = $this->image['disk'];
|
||||||
|
|
||||||
|
// Normalize local disk adapters with symlinked paths to their target path
|
||||||
|
// to support atomic deployments where the base application path changes
|
||||||
|
// each deployment but the realpath of the storage directory does not
|
||||||
|
if (FileHelper::isLocalDisk($disk)) {
|
||||||
|
$realPath = realpath($disk->getAdapter()->getPathPrefix());
|
||||||
|
if ($realPath) {
|
||||||
|
$disk->getAdapter()->setPathPrefix($realPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$config = [
|
$config = [
|
||||||
'image' => [
|
'image' => [
|
||||||
'disk' => $this->image['disk'],
|
'disk' => $disk,
|
||||||
'path' => $this->image['path'],
|
'path' => $this->image['path'],
|
||||||
'source' => $this->image['source'],
|
'source' => $this->image['source'],
|
||||||
],
|
],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue