Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Components added in layout via shortcodes don’t get mounted

See original GitHub issue

Hi, I’m using the elderjs/image plugin and I can’t figure out how to render the picture element in my svelte component

this is my component

<script lang="ts">
  export let helpers;

<style lang="scss">
  img {
    margin: 0.2rem;
    max-height: 4.5rem;
    padding: var(--spacing-0);
    @media (max-width: 40em) {
      max-height: 3rem;
      padding: 0;

<a href={helpers.permalinks.home({slug: '/'})}>
    @html helpers.shortcode({name: 'picture',props:{src:'/img/logo.png'}})

  <!-- {@html helpers.picture('/img/logo.png', {maxWidth: 2000, class:'', alt: ''})} -->

and this is being rendered instead {{picture src=‘/img/logo.png’/}}

I also tried the helpers.picture way but I’m getting helpers.picture is not a function error message If I do that.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

nirjan-devcommented, Nov 2, 2020

@nickreese Thanks for fixing it so quickly 👏 ,I updated elder.js and tried the image plugin shortcode and it’s working now.

nickreesecommented, Oct 31, 2020

@NK-WebDev this was fixed in v1.1.6 that was just published.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Understanding WordPress shortcodes | Layout - Flywheel
Step 1: add the shortcode in your theme's functions.php file. You'll be using the add_shortcode function to give your shortcode a name, and...
Read more >
Using Shortcodes for Custom Elements - Pixelgrade
To check if you have it, go to the Plugins section of your website or click on the Pixelgrade tab, scroll down to...
Read more >
How to Use WordPress do_shortcode
Extend your site's functionality through WordPress do_shortcode function. In this article, we will show you how to apply it!
Read more >
Use shortcodes in your layouts | Beaver Builder Knowledge ...
You can insert Beaver Builder layouts as shortcodes into any text or text editor field, just like you do for any other WordPress...
Read more >
How To Add Shortcodes In Divi - Tutorial by Pee-Aye Creative
The Best Way To Add Shortcodes In your Divi Layout ... but you are using the Divi Theme and don't know how to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found