This plugin hasn’t been tested with the latest 3 major releases of WordPress. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Custom Field Images


This plugin is retired. Please use Post Thumbnails instead.

Custom Field Images provides a flexible way to associate an image to a post and display it anywhere on your site.

Easily insert image data

The plugin adds a custom meta box which is designed specifically for image data, making it easier to use than the generic custom fields box. There is also a button for filling the box automatically with an image uploaded through WordPress.

Manage all images in one go

The plugin has button for importing / exporting / deleting any available images, all at once. Also, you can set default settings for all images, so you don’t have to edit every image if you change your site’s layout.

Show recent posts as images

Instead of displaying recent posts as plain links, you can display them as a list of images, using the built-in widget.

Links: Plugin News | Author’s Site


  • The custom box for inserting image data
  • The quick insert button
  • The settings page


You can use the WordPress plugin installer, or do it manually:

  1. Unzip “Custom Field Images” archive and put the folder into your plugins folder (/wp-content/plugins/).
  2. Activate the plugin from the Plugins menu.


You can add <?php custom_field_image() ?> inside The Loop in the theme files where you want them to appear. Be sure to check the settings so as not to have duplicate images.

For example, if you want them to appear only when viewing posts by category, add the above function to category.php in your theme directory and uncheck “Display in: content and/or excerpt” from the settings page.

You can also add [cfi] where you want the image to appear in the post content (not excerpt). By default, it is inserted at the beginning.

There is also an additional template tag, called get_custom_field_image() which you can use to display the images however you want. See template-tags.php in the plugin directory for more details.


“Parse error: syntax error, unexpected T_CLASS…” Help!

Make sure your host is running PHP 5. Add this line to wp-config.php to check:

Why are the images displayed two times?

Probably because you used the template tag and forgot to uncheck the content, excerpt or feed checkboxes from the Settings page.

Why aren’t my images aligning properly?

This is due to your theme’s CSS. Check if you have something like this in style.css:

img.alignleft {float:left; margin: 0 1em .5em 0}
img.alignright {float:right; margin: 0 0 .5em 1em}
img.aligncenter {display:block; margin: 0 auto .5em auto}
What if I don’t want to use the widget?

You can add <?php cfi_loop($query) ?> directly to your theme files. $query is an optional parameter, which acts as a query string.

How can I delete a custom field image from a post?

Just clear the URL field and save the post.

Contributors & Developers

“Custom Field Images” is open source software. The following people have contributed to this plugin.


Translate “Custom Field Images” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.



  • confirmed 2.9 compatibility


  • fixed image link on single posts


  • added border:0; to all styles for feeds
  • if displaying the post, show only the image, without the link
  • if size not available, use default
  • grab the first image in the gallery tab and not the first image uploaded
  • added Russian translation
  • more info


  • fixed warning
  • set default size to thumbnail


  • added first attachment option
  • better values for get_custom_field_image()
  • bugfix for IE
  • more info


  • add image by ID and size
  • better template tags
  • default URL
  • fixed l10n
  • more info


  • l10n
  • better admin page
  • fixed (Insert CFI) button
  • more info




  • [cfi] shortcode
  • duplicate alt. text as title
  • more info


  • import / export functionality
  • option to automatically link to associated post


  • extra attributes for image link


  • one field per image instead of 4


  • general improvements


  • page support


  • initial release