- 🇫🇷France prudloff Lille
I would love to write a patch for this but since this issue was closed as won't fix, we use a preprocess_field that does this:
foreach ($variables['items'] as $i => $item) { if (isset($item['content']['#theme']) && $item['content']['#theme'] == 'image_style') { $image = \Drupal::service('image.factory') ->get($item['content']['#uri']); $variables['items'][$i]['content']['#width'] = $image->getWidth(); $variables['items'][$i]['content']['#height'] = $image->getHeight(); } }