Title: First instance
Last modified: August 20, 2016

---

# First instance

 *  Resolved [videogramme](https://wordpress.org/support/users/videogramme/)
 * (@videogramme)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/first-instance/)
 * Hi,
 * how exactly do i get the first “thumbnail” attach to a post ?
 * I have multiple images attache on my post.
    But i need to just take the first
   image in thumbnail size. If have got this code that display all attached images
   in thumbnail size :
 *     ```
       $attachments = new Attachments( 'my_attachments' );
       	if( $attachments->exist() ) :
           	    while( $attachments->get() ) :
              		$attachments->image( 'thumbnail' ));
                   endwhile;
       	endif;
       ```
   
 * thanks in advance.
 * [http://wordpress.org/extend/plugins/attachments/](http://wordpress.org/extend/plugins/attachments/)

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

 *  Plugin Author [Jon Christopher](https://wordpress.org/support/users/jchristopher/)
 * (@jchristopher)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/first-instance/#post-3373532)
 * Hi, check out the [usage docs](https://github.com/jchristopher/attachments#usage)
   to see that you need to echo your call to `image()`:
 *     ```
       $attachments = new Attachments( 'my_attachments' );
       if( $attachments->exist() ) :
           while( $attachments->get() ) :
               echo $attachments->image( 'thumbnail' );
           endwhile;
       endif;
       ```
   
 * If you enjoy Attachments please take a second to [rate and review](http://wordpress.org/support/view/plugin-reviews/attachments)!
 *  Thread Starter [videogramme](https://wordpress.org/support/users/videogramme/)
 * (@videogramme)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/first-instance/#post-3373573)
 * Hi,
 * Thanks for the fast respons.
    Sorry it was a copy error. But i still don’t know
   how to display only the first attached image. Help will be much appreciat.
 * Thx in advance
 * _[Don’t bump]_
 *  Thread Starter [videogramme](https://wordpress.org/support/users/videogramme/)
 * (@videogramme)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/first-instance/#post-3373613)
 * it’s not resolved pls give me some help
 *  Plugin Author [Jon Christopher](https://wordpress.org/support/users/jchristopher/)
 * (@jchristopher)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/first-instance/#post-3373618)
 *     ```
       $attachments = new Attachments( 'my_attachments' );
       if( $attachments->exist() ) :
           $attachments->get();
           echo $attachments->image( 'thumbnail' );
       endif;
       ```
   
 *  Thread Starter [videogramme](https://wordpress.org/support/users/videogramme/)
 * (@videogramme)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/first-instance/#post-3373629)
 * Thank you verry much. It work like a charme. Your awesome ; )

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

The topic ‘First instance’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/attachments_fafafa.svg)
 * [Attachments](https://wordpress.org/plugins/attachments/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/attachments/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/attachments/)
 * [Active Topics](https://wordpress.org/support/plugin/attachments/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/attachments/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/attachments/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [videogramme](https://wordpress.org/support/users/videogramme/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/first-instance/#post-3373629)
 * Status: resolved