the_field()
directly echoes the contents of a field. If you want to use the_field()
, you should change the field output to url in acf settings panel (Where you created the field).
If you however wish to play around with var_dump()
and return a specific value from an object, you should use get_field('field_name')
.
So in your example, that would look something like this:
<?php
if(get_field('website_image')):
$wimg = get_field('website_image');?>
<img src="https://wordpress.stackexchange.com/questions/287602/<?php echo $wimg["url']; ?>">
<?php endif;?>