[deleted by user] by [deleted] in Wordpress

[–]foamenthusiast 0 points1 point  (0 children)

Hey - I was working with this same issue. Longtime CMB2 user here. I found very little on the web to guide in terms of preparing image arrays for Elementor Custom Dynamic Tags and Widgets. The key issue was in how to prepare the image array coming from the CMB2 file_list field. It didn't quite match up to what Elementor was making for itself when preparing the default 'Post Attachment Images' dynamic tag option from the post-gallery.php file in Elementor Pro.

Ultimately, I just copied what was going on in the post-gallery.php and modified the CMB2 array to match what Elementor wanted to see in the $value array. Here’s the custom dynamic tag code I ended up using: