<?php 

$featured_image_url = wp_get_attachment_url(get_post_thumbnail_id());
$attachment_title = get_the_title();
?>
	
	<?php if ( !empty( $featured_image_url )) { ?>
		<div class="portfolio_image">
			<img src="<?php echo esc_url( $featured_image_url ); ?>" alt="<?php echo esc_attr( $attachment_title ); ?>" />
		</div>
	<?php } ?>