If you run a blog that has a lot of pics in it (perhaps photography blog?), you could easily display only images in your blog search results. WordPress by default doesn’t display any images in the search results.
For example, when people look for, let’s say “cars”, they would only see title of the post followed by pictures of cars in the search results. This would make your blog’s search function a lot more user-friendly and usable, because nothing is worse than looking for an image in the photography blog and getting search results in only text format.
Identifying images that lie behind the page through reading texts is a nightmare. Instead, it’s a lot easier to see few cars and decide which one to click right on the search results page.
Quick tutorial below on how to implement such a feature:
- Download and install this plugin
- Add the code below somewhere in your search results page (usually search.php). Make sure it’s inside the loop. It should be placed after the title tags and before the comments tags
<?php if ( function_exists( ‘get_the_image’ ) ) { get_the_image(‘width=640&height=300&image_scan=true&default_image=http://www.yourdomain.com/default_image.jpg’ ); } ?>

Don’t forget to define the image width and height accordingly. default_image.jpg is the pic that will be used if the post doesn’t have any images in it.
You are done! Your readers are happy now.
Plugin Link: http://wordpress.org/extend/plugins/get-the-image/



Neat plugin. Gotta love wordpress and all of their awesome plugin additions. Reminds me of the iPhone and all of those useful apps that enhance the product. Sure makes for a successful business model.
-Jack
You are always so detailed with the information you provide. While I don’t currently have a use for this plugin, I will store it in my arsenal of information so when I do have a site with lots of images I can make sure people are able to search and find the pic they are looking for. Thanks once again.
Thanks for php-code listing, that was interesting.
Great plugin. WordPress continues to amaze me with their progressive thinking and service to their users.
I love all your cool WordPress tips and hacks. I am amazed at what can be done with WordPress.
Wow I could totally see how powerful this wordpress plugin truly is! =D
Till then,
Jean
Hey Ades,
Thanks for this eye-opening post. I wasn’t aware of this fact. As my blogs generally have near about 3 pics per post and I devote time to optimize it.
And if they are not being searched out then my efforts are really a waste. The plug-in that you have mentioned looks efficient to handle out this problem.
Thanks for this information again.
ehm..that was good. I like to try it at my blog.
This is really very nice tutorial for wordpress blogger who want to display only picture on their search results.
I am using blogger blog, so I think I can not use this tips. Well thank you lots.
Hi Ades,
I think it’s cool to see php codes as well. At times, its missing. Its a really helpful for picture blogs.
Great plugin indeed! That what sets apart WordPress from all other blogging platforms.
They never stop on improving the blogging experience of bloggers all over by offering lots of plugins.
This is very useful. I do tend to click on the pictures when I search, as they stand out a mile from the text!
Is it possible to do this with video too? So if you had video embedded on your page this would show up in the search engine instead of text?
Excellent hack! Another classic example of the WordPress system evolving and adapting. This image search capability will definitely enhance the user experience, plugging a gap.
The evolution of WordPress is something that I find fascinating and it is getting more
thanks. I will use it for my new project.
Nice hack for photo blogs.
Is there any way to show limited (fixed number)of images in the search page??
Thanks.
thanks guys!
@techprism, actually that can be done in the wordpress template page in search or search results page.
Cool plugin, I am going to download this one. And yes this is more user-friendly. Thanks for this plugin and advice.
Awesome! You have brought out the importance of the plugin with great details.
thank you for this details. Last month i was searching for such similar thing, but here we are, found it now when i am not searching for :)
Great plugin ades.This plugin is very much useful for the wallpapers related sites which setup in wordpress.
But i have observed that many wallpapers sites are in html rather in wordpress. Will this works for html template?
Worpress is place more things work with plugin and i like this.. Its easy to set up and again one nice plugin thanks for sharing us.
i have many photoblogs and it is exactly what i was looking for.. thanks a lot .
Cool plugin. This can certainly improve the functioning of search in blogs.
Like thumbnailed related posts.Good plugin thanks Ades
@ faydaliweb, its not similar to related post thumb, its a kind different :)