Title: getImage function
Last modified: August 20, 2016

---

# getImage function

 *  [influus](https://wordpress.org/support/users/influus/)
 * (@influus)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/getimage-function/)
 * I am currently using the <?php getImage(‘1’); ?> function from ([http://bavotasan.com/2009/retrieve-the-first-image-from-a-wordpress-post/](http://bavotasan.com/2009/retrieve-the-first-image-from-a-wordpress-post/))
   to display pictures on my homepage.
 * Are there any alternatives? [http://www.influ.us](http://www.influ.us)

Viewing 1 replies (of 1 total)

 *  [dtrickky](https://wordpress.org/support/users/dtrickky/)
 * (@dtrickky)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/getimage-function/#post-2439431)
 * You can display featured images of posts.
 *     ```
       <?php // Insert featured image
       	if (has_post_thumbnail()) {
       	the_post_thumbnail('thumbnail', array(
       	'class' => '',
       	'title' => ''));
       	 // endif; ?>
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘getImage function’ is closed to new replies.

## Tags

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

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 1 reply
 * 2 participants
 * Last reply from: [dtrickky](https://wordpress.org/support/users/dtrickky/)
 * Last activity: [14 years, 6 months ago](https://wordpress.org/support/topic/getimage-function/#post-2439431)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
