Skip to content
Snippets Groups Projects
Commit e7ea25db authored by Eric Bremner's avatar Eric Bremner
Browse files

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

parent 61e1db6e
No related branches found
No related tags found
1 merge request!266ISTWCMS-7285: Fix uri for sized image block on existing blocks
...@@ -184,6 +184,11 @@ class UwCblImage extends BlockBase implements ContainerFactoryPluginInterface { ...@@ -184,6 +184,11 @@ class UwCblImage extends BlockBase implements ContainerFactoryPluginInterface {
$output['caption_format'] = $this->configuration['caption_format'] ?? 'underneath_photo'; $output['caption_format'] = $this->configuration['caption_format'] ?? 'underneath_photo';
$output['caption_alignment'] = $this->configuration['caption_alignment'] ?? 'left'; $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. // Load values in build array.
$build = [ $build = [
'#theme' => 'uw_block_image', '#theme' => 'uw_block_image',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment