Title: Image size question
Last modified: August 19, 2016

---

# Image size question

 *  [ThorHammer](https://wordpress.org/support/users/thorhammer/)
 * (@thorhammer)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/image-size-question/)
 * In my theme I have images on my home-templated repeated in my single article 
   view on single.php. Is it any way to have images on single.php a lot larger than
   on home.php, using the same uploaded picture?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/image-size-question/#post-1151119)
 * That depends. What is being used in both templates to call the relevant image?
 *  Thread Starter [ThorHammer](https://wordpress.org/support/users/thorhammer/)
 * (@thorhammer)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/image-size-question/#post-1151185)
 * esmi, thanks for replying. Here we go:
 * in **home**.php:
 *     ```
       <?
       		if($post_image !== '') {
       		// display the image, its alt text, and wrap it with a link to "single.php" ?>
       		<div class="imgleft" >
       			<a href="<?php the_permalink(); ?>" title="<?php if($post_alt !== '') echo $post_alt; else the_title(); ?>">
       			<img src="<?php echo $post_image; ?>"
       			alt="<?php if($post_alt !== '') echo $post_alt; else the_title(); ?>"
       			 style="width:250px; " /></a></div>
       ```
   
 * in **single**.php:
 *     ```
       <img src="<?php echo $post_image; ?>"
       	alt="<?php if($post_alt !== '') echo $post_alt; else the_title(); ?>"
       	class="left" width="250px" />
       ```
   
 * I would like the image (uploaded original in more than 1000 px wide) to be repeated
   on single.php to be about 900 px wide.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/image-size-question/#post-1151203)
 * Try:
 *     ```
       <img src="<?php echo $post_image; ?>"
       	alt="<?php if($post_alt !== '') echo $post_alt; else the_title(); ?>"
       	class="left" width="900px" />
       ```
   
 * in single.php.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Image size question’ is closed to new replies.

## Tags

 * [post](https://wordpress.org/support/topic-tag/post/)

 * 3 replies
 * 2 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [17 years, 1 month ago](https://wordpress.org/support/topic/image-size-question/#post-1151203)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
