Title: Image Display
Last modified: February 1, 2022

---

# Image Display

 *  Resolved [jerryberry12](https://wordpress.org/support/users/jerryberry12/)
 * (@jerryberry12)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/image-display-12/)
 * Is there are way to show all images in media library on the website? I’m making
   a gallery. The uploaded images go to the media library.
    -  This topic was modified 4 years, 4 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fimage-display-12%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Thread Starter [jerryberry12](https://wordpress.org/support/users/jerryberry12/)
 * (@jerryberry12)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/image-display-12/#post-15315661)
 * Password (For Now): test
 *  [Javier Arce](https://wordpress.org/support/users/javiarce/)
 * (@javiarce)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/image-display-12/#post-15315677)
 * Hi! I think [this previous reply](https://wordpress.org/support/topic/way-to-display-links-images-to-all-images-on-website/)
   could help you achieve what you are asking.
 *  Thread Starter [jerryberry12](https://wordpress.org/support/users/jerryberry12/)
 * (@jerryberry12)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/image-display-12/#post-15315694)
 * I am not too tech inclined. Is there a guide to help me?
 *  [Javier Arce](https://wordpress.org/support/users/javiarce/)
 * (@javiarce)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/image-display-12/#post-15315771)
 * I’ll try to find some guides, in the meantime, here’s is a very basic snippet
   of code you could use.
 * If you paste it inside the PHP file of the template where you want to show the
   images, it’ll render every image inside your Media Library… so be careful with
   the things you upload there.
 *     ```
       <?php
       $query_images_args = array(
           'post_type'      => 'attachment',
           'post_mime_type' => 'image',
           'post_status'    => 'inherit',
           'posts_per_page' => - 1,
       );
   
       $query_images = new WP_Query( $query_images_args );
   
       $images = array();
   
       foreach ( $query_images->posts as $image ) {
           $img = wp_get_attachment_url( $image->ID );
           print '<img src="'.$img.'"/>';
       }
       ?>
       ```
   
 *  [Javier Arce](https://wordpress.org/support/users/javiarce/)
 * (@javiarce)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/image-display-12/#post-15315798)
 * Ok, I think this guide could be helpful for you: [A Detailed Guide To A Custom WordPress Page Templates](https://www.smashingmagazine.com/2015/06/wordpress-custom-page-templates/)
 *  Thread Starter [jerryberry12](https://wordpress.org/support/users/jerryberry12/)
 * (@jerryberry12)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/image-display-12/#post-15316112)
 * thanks

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

The topic ‘Image Display’ is closed to new replies.

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)
 * [media library](https://wordpress.org/support/topic-tag/media-library/)
 * [templates](https://wordpress.org/support/topic-tag/templates/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 2 participants
 * Last reply from: [jerryberry12](https://wordpress.org/support/users/jerryberry12/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/image-display-12/#post-15316112)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
