<?php 
  /*
  $image =  For Image
*/
 $image = wp_get_attachment_image_src($image, 'small-thumb');
 $image = $image[0];


  if ( ! empty( $link )){
         echo '<div class="item"><a href="' .$link. '"><img src="'.$image.'" alt="' .$title. '"></div></a>';
        }elseif(! empty( $image ) || ! empty( $title )){
            echo '<div class="item"><img src="'.$image.'" alt="' .$title. '"></div>';
        }


?>