Title: Using Shortcode on Custom Image In Loop
Last modified: August 22, 2016

---

# Using Shortcode on Custom Image In Loop

 *  Resolved [strategery](https://wordpress.org/support/users/strategery/)
 * (@strategery)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/using-shortcode-on-custom-image-in-loop/)
 * I am trying desperately to create a loop of custom posts with an image field.
   The closest I’ve got is to get the image ID to display.
 * I have tried every variation from ‘[content field headshot]’ to ‘[field headshot:
   to_image_src]’ and many, many other variations.
 * From what I’ve read, it appears that displaying an image is perhaps something
   a shortcode cannot do, or cannot do in a loop with a custom field.
 * Either way, I’m kind of at the end of my tether. Any advice on how to get this
   to work?
 * [https://wordpress.org/plugins/custom-content-shortcode/](https://wordpress.org/plugins/custom-content-shortcode/)

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

 *  Plugin Author [Eliot Akira](https://wordpress.org/support/users/miyarakira/)
 * (@miyarakira)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/using-shortcode-on-custom-image-in-loop/#post-5170875)
 * Hello,
 * It should be possible to display an image field stored as attachment ID, like
   this:
 *     ```
       [content image="image_field_name" size="thumbnail"]
       ```
   
 * There is a short description of the _image_ parameter under the Content tab in
   the documentation (Settings -> Custom Content).
 * Please let me know if that works for you.
 *  Thread Starter [strategery](https://wordpress.org/support/users/strategery/)
 * (@strategery)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/using-shortcode-on-custom-image-in-loop/#post-5170949)
 * That worked! Thank you so much. I’m fairly new to WordPress, as I mostly have
   worked in drupal, so understanding the syntax has proven to be a bit of a challenge.
   Thanks for the quick and accurate response!
 *  Plugin Author [Eliot Akira](https://wordpress.org/support/users/miyarakira/)
 * (@miyarakira)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/using-shortcode-on-custom-image-in-loop/#post-5171028)
 * Sure, no problem, I’m glad it worked. I’ll try to improve the documentation to
   make it more clear, maybe more examples.

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

The topic ‘Using Shortcode on Custom Image In Loop’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-content-shortcode_766976.svg)
 * [Custom Content Shortcode](https://wordpress.org/plugins/custom-content-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/custom-content-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-content-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-content-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-content-shortcode/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Eliot Akira](https://wordpress.org/support/users/miyarakira/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/using-shortcode-on-custom-image-in-loop/#post-5171028)
 * Status: resolved