Support Forum
Support › MB Elementor Integrator › Image Select not showing from a Dynamic selectionResolved
Hello, as far as the initial selection it's working. I have an option of 2 images and the database is showing which image I have selected correctly.
I have created a loop for Property Archives on a real-estate site.
The dynamic selection is showing and I can pick that field but the image does not show.
(If I simply select an image from the library it will show)
Here is the code for the image select
[
'name' => __( 'Sales Person', 'your-text-domain' ),
'id' => $prefix . 'sales_person',
'type' => 'image_select',
'options' => [
'image01' => __( 'http://mysite.ca/realestate400/wp-content/uploads/2021/04/female-1.png', 'your-text-domain' ),
'image02' => __( 'http://mysite.ca/realestate400/wp-content/uploads/2021/04/female02.png', 'your-text-domain' ),
],
'save_field' => 1,
]
Thank you
Hi,
The image URLs are not accessible
http://mysite.ca/realestate400/wp-content/uploads/2021/04/female-1.png
http://mysite.ca/realestate400/wp-content/uploads/2021/04/female02.png
Can you please change it to your site URL http://zentyx.ca/?
http://zentyx.ca/realestate400/wp-content/uploads/2021/04/female-1.png
http://zentyx.ca/realestate400/wp-content/uploads/2021/04/female02.png
[
'name' => __( 'Sales Person', 'your-text-domain' ),
'id' => $prefix . 'sales_person',
'type' => 'image_select',
'options' => [
'image01' => __( 'http://zentyx.ca/realestate400/wp-content/uploads/2021/04/female-1.png', 'your-text-domain' ),
'image02' => __( 'http://zentyx.ca/realestate400/wp-content/uploads/2021/04/female02.png', 'your-text-domain' ),
],
'save_field' => 1,
]
I changed my url to Mysite.ca in the code block here. It's correct on the site
Hi,
Can you please share some screenshots of the issue? You can also follow the Debugging Information step to troubleshoot the issue https://support.metabox.io/topic/how-to-create-a-new-topic/.
Let me know how it goes.
Hello Long, thanks for that info. I think this error info may help...
Warning: Invalid argument supplied for foreach() in /home/zentyx/public_html/realestate400/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-elementor-integrator/src/Traits/Fields/Image.php on line 31
Here is the set up with a simple image grab directly from the library
And here is the set up with the metabox image select
Thank you so much for your time
Hi,
Thanks for your additional information.
If you are using the Elementor page builder, please use another image field such as single_image. The field type image_select
saves the value image01
or image02
in the database instead of image ID, so the Elementor cannot render the image based on that value.
Get more details on the documentation https://docs.metabox.io/fields/image-select/#data
Okay, I'll set it up another way.
Thanks for your time