Does anyone know how I automatically add the URL of the uploaded image to a custom field?
In other words, When I upload a image I want the url to the image to get a custom field variable automatically so I dont have to add the URL manually to the custom field all the time.
I need a seamless integration to make is user-friendly. I want to use scripts like timthumb instead of the built in WP functionality.
-----UPDATE:
Here is some code I have. Just missing the thumbnail variable in the custom value field.
add_action('wp_insert_post', 'mk_set_default_custom_fields');
function mk_set_default_custom_fields($post_id)
{
if ( $_GET['post_type'] != 'post' ) {
add_post_meta($post_id, 'Image', 'I WANT THE THUMBNAIL HERE', true);
}
return true;
}
