Hello!
I use an image field named “image_artiste”. I used image object in the option. I wanted to use the url of my image that I uploaded before to put the url as a background-image to my li element with this code: <li style="background: url('<?php the_field("image_artiste")["url"]; ?>'); "></li>
so the_field("image_artiste")["url"]
doesn’t work because it gave me the complete array with all the data and not only the url even if a do an echo outsite of my li element. So i’m obligate to use the url option in the return value
thank!
the_field("image_artiste")
echos the value of the field '['url']
has no meaning here since the value is not returned. Try echo get_field("image_artiste")["url"];
but I’m not sure this will work or the following which will always work.
$image = get_field("image_artiste");
echo $image['url'];