Commit d95a6b00 authored by catch's avatar catch

Issue #2977250 by alexpott: Media subsystem 99% of time uses thumbnail URI not URL

parent bb6ea924
...@@ -115,11 +115,11 @@ public function buildRow(EntityInterface $entity) { ...@@ -115,11 +115,11 @@ public function buildRow(EntityInterface $entity) {
/** @var \Drupal\media\MediaInterface $entity */ /** @var \Drupal\media\MediaInterface $entity */
if ($this->thumbnailStyleExists) { if ($this->thumbnailStyleExists) {
$row['thumbnail'] = []; $row['thumbnail'] = [];
if ($thumbnail_url = $entity->getSource()->getMetadata($entity, 'thumbnail_uri')) { if ($thumbnail_uri = $entity->getSource()->getMetadata($entity, 'thumbnail_uri')) {
$row['thumbnail']['data'] = [ $row['thumbnail']['data'] = [
'#theme' => 'image_style', '#theme' => 'image_style',
'#style_name' => 'thumbnail', '#style_name' => 'thumbnail',
'#uri' => $thumbnail_url, '#uri' => $thumbnail_uri,
'#height' => 50, '#height' => 50,
]; ];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment