Title: Get images from post within loop
Last modified: August 21, 2016

---

# Get images from post within loop

 *  [tmyie](https://wordpress.org/support/users/tmyie/)
 * (@tmyie)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/get-images-from-post-within-loop/)
 * I’m trying to target and style the media attached to a post.
 * I’m aware of
 *  `<?php the_title(); ?>`
 * Is there a way I can do the same with an attached image?

Viewing 1 replies (of 1 total)

 *  [Vinod Dalvi](https://wordpress.org/support/users/vinod-dalvi/)
 * (@vinod-dalvi)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/get-images-from-post-within-loop/#post-4042766)
 * Yes you can do the same with the attached featured image of the post using the_post_thumbnail()
   function.
 * <?php the_post_thumbnail(); ?>
 * For more information visit [this page](http://codex.wordpress.org/Function_Reference/the_post_thumbnail).

Viewing 1 replies (of 1 total)

The topic ‘Get images from post within loop’ is closed to new replies.

## Tags

 * [images](https://wordpress.org/support/topic-tag/images/)
 * [index](https://wordpress.org/support/topic-tag/index/)
 * [loop](https://wordpress.org/support/topic-tag/loop/)

 * 1 reply
 * 2 participants
 * Last reply from: [Vinod Dalvi](https://wordpress.org/support/users/vinod-dalvi/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/get-images-from-post-within-loop/#post-4042766)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
