Hi there!
I’ve tried to replicate your exact code, with PHP 8.2 and L&L version 3.1.7. For me, it worked just fine. Can you provide more details about how are you displaying your template?
Do you use a saved template?
Do you use a theme and display it within it?
Do you display it in Gutenberg with a Tangible Template and you write your code directly on the page?
yes, a saved template.
I use Twenty Twenty-Three with a Childtheme.
The template is used inside a Gutenberg cover block.
Use the Template by Shortcode [template id=322]
Thank you for reporting the issue. This should be fixed in the next version, 3.1.8.
It was a bug that appeared in a very specific situation, when the template shortcode was used inside an HTML attribute (in this case <img src="..">) and its content was a URL.
By the way, I couldn’t figure out how to use a shortcode for an image URL in the Cover block. I see options to: Upload an image, choose one from the Media Library, or use a Featured Image. And I looked around in each option, but couldn’t see any setting field for image URL.
Hi,
Thank you for your quick support.
Version 3.1.8 now does what it should again
Gutenberg unfortunately has no UI for this case.
Place a cover block and include any image.
Switch from Visual Editor to Code Editor and replace the Image Path with the Shortcode.
If you find yourself doing tricky work arounds like this I would consider replacing the entire block with a L&L Template. It’s probably not that hard and you copy the CSS out of the Chrome inspector or whatever browser you use.