Title: Image Metadata
Last modified: August 19, 2016

---

# Image Metadata

 *  [guyen](https://wordpress.org/support/users/guyen/)
 * (@guyen)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/image-metadata/)
 * how do you display image metadata information on the image.php and be able to
   control what displays and what is not.
 * the code i am using in the functions.php is,
 *     ```
       function myMetaData($pic) {
         $html = '';
         $meta = wp_get_attachment_metadata($pic);
         if($meta) {
             $html = '
       <ul>';
             foreach($meta['image_meta'] as $key => $value) {
                 $html .= '
       <li>' . $key . ': <strong>' . $value . '</strong></li>
       ';
             }
             $html .= '</ul>
       ';
         }
         return $html;
       }
       ```
   
 * and `<?php echo myMetaData($post->ID); >` in the image.php
 * I just only want to display certain metadata, not all of them.

The topic ‘Image Metadata’ is closed to new replies.

## Tags

 * [image](https://wordpress.org/support/topic-tag/image/)
 * [metadata](https://wordpress.org/support/topic-tag/metadata/)
 * [photo](https://wordpress.org/support/topic-tag/photo/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [guyen](https://wordpress.org/support/users/guyen/)
 * Last activity: [15 years, 11 months ago](https://wordpress.org/support/topic/image-metadata/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
