Due to lack of reputation, I must now ask the question. I want to create a search for all images in the media libary. The search result should only appear if you search for the exact title of the image. I already tried it with 'exact' => true but it does not work. Still get similar images displayed. I have created a query with the following parameters:
<?php
$args = array(
'post_type' => 'attachment',
'post_mime_type' => 'image',
'orderby' => 'post_date',
'order' => 'desc',
'posts_per_page' => '30',
'post_status' => 'inherit',
);
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
$image = wp_get_attachment_image_src( get_the_ID() );
echo "<img src='" . $image[0] . "'>";
endwhile; ?>
Hope that somebody can help me.