SpottedKoi Auto Custom Image Field Plugin

This plugin will run a quick regular expression against the content of your post as it is published or edited to get the first image in your post and set the URL as the custom field your theme uses.

You have the option to have the plugin automatically update the custom field if it is set or leave it alone, all depending on a setting.


  • Reads the content of your post for images, updates or inserts the custom field upon publish/save
  • Will set this field as posts are published to your site, if it’s not already set
  • Has the ability to re-update if you change your posts


Download Auto Custom Image Field 1.0


To install, follow your normal plugin installation routine. This means you either download it from the WordPress Plugin page and upload via FTP, download it from here and upload via FTP, or use WordPress’s auto install procedure from your plugin admin page.


There are two options in this plugin that can be configured:

Setting the custom field to be updated

Find the line that looks like:

define(‘SK_CUSTOM_IMAGE_FIELD’, ‘photo’);

Change the word ‘photo’ to the field name your theme uses.

Save the file and re-upload to your server.

Setting whether to re-update the image field upon subsequent saves

Find the line that looks like:


Change true to false and once the image is set, it will not be changed.

Save the file and re-upload to your server.


Please sign up and post your questions or issues in our support forum.