Display attachment thumbnail with image metadata

Go to source

snippet :  PHPcopy
<?php
if($images =& get_children( 'post_type=attachment' )){
   foreach($images as $id => $attachment ){
	   echo '<div>';
	   echo wp_get_attachment_image( $id, 'thumb' )."<br />";
           $meta = wp_get_attachment_metadata($id);
           echo "Credit:  ".$meta[image_meta][credit]."<br /> ";
           echo "Camera:  ".$meta[image_meta][camera]."<br />";
           echo "Focal length:  ".$meta[image_meta][focal_length]."<br />";
           echo "Aperture:  ".$meta[image_meta][aperture]."<br />";
           echo "ISO:  ".$meta[image_meta][iso]."<br />";
           echo "Shutter speed:  ".$meta[image_meta][shutter_speed]."<br />";
           echo "Time Stamp:  ".$meta[image_meta][created_timestamp]."<br />";
           echo "Copyright:  ".$meta[image_meta][copyright];
	   echo '</div>';
   }
}
?>


Display attachment thumbnail with image metadata is a post from: wpsnipp.comWordPress Snippets, Code, Hacks, 590+ for your theme, blog
which is not allowed to be copied on other sites.”

Share this post.


Display attachment thumbnail with image metadata“>Facebook | Display attachment thumbnail with image metadata“>StumbleUpon | Display attachment thumbnail with image metadata“>Delicious | Display attachment thumbnail with image metadata @wpsnipp”>Tweet It |