Skip to content
Snippets Groups Projects

ISTWCMS-7285: Fix uri for sized image block on existing blocks

1 file
+ 5
0
Compare changes
  • Side-by-side
  • Inline
@@ -184,6 +184,11 @@ class UwCblImage extends BlockBase implements ContainerFactoryPluginInterface {
$output['caption_format'] = $this->configuration['caption_format'] ?? 'underneath_photo';
$output['caption_alignment'] = $this->configuration['caption_alignment'] ?? 'left';
// If the uri is not set, then set it.
if (!isset($output['image']['uri'])) {
$output['image']['uri'] = $this->fileUrlGenerator->generate($output['image']['dirname'] . '/' . $output['image']['basename'])->toString();
}
// Load values in build array.
$build = [
'#theme' => 'uw_block_image',
Loading