Adding custom fields to images
Where you put it depends, you likely want to put the get_post_meta() call: echo get_post_meta( get_the_ID(), ‘_custom_field’, true ) ); into the according template file. But of course you can also hook into a filter or action from your functions.php or a plugin.