WordPress getting thumnails of images in custom fields

In my current wordpress customisation project, I have some custom image upload fields for some custom post types.
On the front end I will receive the data from these custom fields , ie. URLs of these custom images using the function get_post_meta( ).But in that case I get the original full sized image uploaded through the meta box.How can I get the thumbnail of the uploaded meta field.There are more than one image fields for the post type.Here is my current code for getting images

        $meta = get_post_meta( $post_id  );
           //print_r($meta);
            $client = $meta['client'][0];
            $channel = $meta['channel'][0];
            $logistics = $meta['logistics'][0];
            $head = $meta['headline2'][0];
            $img1 =  isset($meta['image1'])?$meta['image1']:'';//image field 1
            $img2 = isset($meta['image2'])?$meta['image2']:'';//image field 2
            $img3 = isset($meta['image3'])?$meta['image3']:'';//image field 3

Related posts

Leave a Reply

1 comment

  1. Please check this link for adding images to posts.
    
    http://justintadlock.com/archives/2007/10/27/wordpress-custom-fields-adding-images-to-posts
    
     OR
    
    Try wp_get_attachment_image_src()
    
    $attachment_id = get_field('field_name');
    $size = "medium"; // (thumbnail, medium, large, full or custom size)
    $image = wp_get_attachment_image_src( $attachment_id, $size );