Why is shortcode not rendering image tag with attributes (WPBakery Page builder)

Using WPBakery page builder I include a single image block, select an image and the thumbnail image displays on the draft. The page saves fine and the image is still there if I re-edit the page.
When I look in the database the shortcode is present in the page content so this issue is definitely to do with rendering not saving.
The shortcodes for the page are as follows:

[vc_row][vc_column][vc_single_image image="1129" alignment="center" img_size="320x100"][/vc_column][/vc_row]
[vc_row][vc_column][vc_column_text]I am text block test[/vc_column_text][/vc_column][/vc_row]

When I look at the page in the front end the text block renders fine as does all the structural stuff but the single image block renders the image thus:

None of the attributes that are present in the shortcode are rendered in the image tag.

If I choose to have a link to the full size image the url to the full sized image that is wrapped around the img tag is generated fine and the url displays the image so the data is there.

Anyone any ideas of what is going on? Page Builder Plugin is up to date as is wordpress and theme.

I’m not very familiar with the internals of how shortcodes are rendered but I have found a file in plugins/js_composer/include/classes/shortcodes called vc-single-image.php
I can’t however get it to echo anything out into the page when I view it so I’m wondering if the actual rendering of the content happens somewhere else.

Can anyone advise on how I can proceed on debugging this? I’m stuck.

Read more here:: Why is shortcode not rendering image tag with attributes (WPBakery Page builder)

Leave a Reply

Your email address will not be published. Required fields are marked *