Adds the function wp_get_post_image(), giving theme builders easy access to images associated with a post or page.
As of April 2026, WP Get Post Image is a WordPress images plugin with 100 active installations and a 0/5 rating0. It has been downloaded 10K+ times in total. Requires WordPress 2.8.4+ and PHP false+. Available on WordPress.org since 2009. Last updated 15 years ago — may have compatibility concerns. Top alternative: Autoptimize.
This plugin provides the template tag wp_get_post_image(). Use it to call dynamically created images uploaded via the WordPress media uploader.
NOTE: This plugin is intended for use by WordPress developers and theme builders only.
<?php wp_get_post_image($args); ?>
<?php $args = array(
'width' => null,
'height' => null,
'css' => '',
'parent_id' => '',
'post_id' => '',
'filename' => '',
'return_html' => true
); ?>
By default, the function returns:
<img />).width no greater than 200px.wp-image-*ID* and no other classes.thickbox via css, the appropriate anchor <a> tag will be ad…| WordPress | 2.8.4+ requiredTested up to 3.0.5 |
| PHP | false+ required |
$image->basepath to reference get_bloginfo('wpurl') instead of get_bloginfo('url'). This makes the plugin work when WordPress is installed in one directory while the blog displays in another. (HT: Mike Cohen)Plugin data sourced from WordPress.org. Analysis and metrics by PluginSift.