Title: image showing up as code
Last modified: August 31, 2016

---

# image showing up as code

 *  [highprrrr](https://wordpress.org/support/users/highprrrr/)
 * (@highprrrr)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/image-showing-up-as-code/)
 * I created a field with the field name “image”.
 * I added this to my single.php file: `<h2><?php the_field(‘image’); ?></h2>
    `
 * Then, in the post editor, I uploaded an image.
 * but on the post, this is what shows up where the image should be:
 * `16, , CAO_Brazilia_Cariocas_large, , , image/jpeg, http://smokintheology.com/
   wp-content/uploads/2016/03/CAO_Brazilia_Cariocas_large.jpeg, 405, 480, Array`
 * [https://wordpress.org/plugins/advanced-custom-fields/](https://wordpress.org/plugins/advanced-custom-fields/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [FrancescoCarlucci](https://wordpress.org/support/users/francescocarlucci/)
 * (@francescocarlucci)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/image-showing-up-as-code/#post-7230612)
 * Hi James,
 * your code seems to return the entire image object.
 * Probably you can try something like:
 *     ```
       <?php $image = get_field('image'); ?>
   
       <img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />
       ```
   
 * Good luck 😉
    Francesco
 *  [Chipleh](https://wordpress.org/support/users/chipleh/)
 * (@chipleh)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/image-showing-up-as-code/#post-7230689)
 * [@francescocarlucci](https://wordpress.org/support/users/francescocarlucci/) –
   that’s perfect man – exactly the answer I was looking for as well – cheers to
   you.
 *  [FrancescoCarlucci](https://wordpress.org/support/users/francescocarlucci/)
 * (@francescocarlucci)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/image-showing-up-as-code/#post-7230690)
 * I’m glad it helped 😉

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘image showing up as code’ is closed to new replies.

 * ![](https://ps.w.org/advanced-custom-fields/assets/icon.svg?rev=3207824)
 * [Advanced Custom Fields (ACF®)](https://wordpress.org/plugins/advanced-custom-fields/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-custom-fields/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-custom-fields/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-custom-fields/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-custom-fields/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-custom-fields/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [FrancescoCarlucci](https://wordpress.org/support/users/francescocarlucci/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/image-showing-up-as-code/#post-7230690)
 * Status: not resolved