Issue by phma: Thumbnail updates read width and height from source image on save even if queued

(cherry picked from commit 9edbbe5a04)
merge-requests/803/head
Lee Rowlands 2021-06-14 17:08:47 +10:00
parent a669b983cc
commit e396c255f5
No known key found for this signature in database
GPG Key ID: 2B829A3DF9204DC4
1 changed files with 2 additions and 1 deletions
core/modules/media/src/Plugin/media/Source

View File

@ -130,12 +130,13 @@ class Image extends File {
}
$uri = $file->getFileUri();
$image = $this->imageFactory->get($uri);
switch ($name) {
case static::METADATA_ATTRIBUTE_WIDTH:
$image = $this->imageFactory->get($uri);
return $image->getWidth() ?: NULL;
case static::METADATA_ATTRIBUTE_HEIGHT:
$image = $this->imageFactory->get($uri);
return $image->getHeight() ?: NULL;
case 'thumbnail_uri':