JR Post Image is a light-weight plugin that displays an image ‘attached’ to a post in a SEO friendly way. For example, it can be used on the frontpage of your blog. The plugin can also be used on a post/page, to show all images attached to the post. (All images in Image Gallery).
- Makes your WordPress blog looks nicer
- SEO friendly, automatically fills in alt-tag, and image dimensions
- Always uses the right image dimensions, as set the admin panel (under Settings->Media ‘thumbnail’ size)
- Does not slow down your blog, because the thumbnails are already generated by WordPress itself!
- Very lightweight, small code
Screenshots
Images can be styled using CSS. By default, images are class ‘jr-post-img‘. Also check out my website NetbookInfo.nl, the plugin is used on the frontpage and every post/page.


Installation
- Upload
jr-post-image.php
to your
wp-content/plugins/
directory and activate the plugin.
- Add the code to your
index.php
theme file (for front page), that’s where the image will show up.
- Go to Settings – Media and change the ‘Thumbnail’ dimensions.
- Upload images to a post, you don’t have to insert them in the post itself (as long as there in the gallery).
The code
<?php if ( function_exists('jr_post_image') ) {
jr_post_image($id);
} ?>
Show image list
You can also use this plugin to show all/some images attached to a post by adding the following code to your single.php or page.php theme file:
<?php if ( function_exists('jr_post_image') ) {
jr_post_image_list($id, 3);
} ?>
In the above example, 3 is the number of images that will be showed. In the configuration panel, you can change settings like Lightbox support, Before and After Image Code, Skip First Image and more.
Disabling Post Image for a specific post/page
JR Post Image can be disabled for a specific post/page by adding a custom field to the post/page named ‘jr_nopostimage’ with the value ‘true’ (without quotes). Then the post image won’t be showed in the post itself, but it still will be showed on the index page.
