Should you visit this website:

You'd observe that there's a picture and summary for every publish. What's the best way to implement that?

Is done using wordpress custom fields?
Or whether this really is created in image.php file contained in theme folder?
How do you do this?


Probably with a custom area that takes a picture source. Then your publish template could be transformed to ascertain if a picture is placed and, if it's, include it.

There's an easy method - you may also make use of this function too -

function catch_that_image() {
    global $post, $posts;
        $first_img = '';
        $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
        $first_img = preg_replace("/_thumb[0-9]\./", "$1.", $first_img);

    // no image found display default image instead
            $first_img = "/wp-content/default.png";
        return $first_img;

should you place this function for your functions.php of the theme you are able to place

<img src="<?php echo catch_that_image(); >" width="50" height="50" alt="<?php the_title(); ?>" />

inside your single.php and index.php

This function will catch the very first image in ever publish and can display it, if we're not available - it'll play one Default image which you'll change...

Or any other way:

<?php $image = get_post_meta($post->ID, 'postimage', true); ?>

<img src="<?php echo $image; ?>" alt="<?php the_title(); ?>" />

Should you put this inside your index.php or single.php it'll make use of the image succumbed area "postimage" (customfield in posts/pages).

I really hope this can help