Jump to content

Is your K2 main image not sizing properly after updating the item.php file?


Rob Larkins

Recommended Posts

After updating the K2 item.php file with the everywhere code snippets inserted, I found my main images were no longer following the settings. After comparing side by side the new file to the old, I found a little piece of code was fell off. If this is happening to you, check line 225 of your K2 item.php file.

 

change this:

<img src="<?php echo $this->item->image; ?>" alt="<?php if(!empty($this->item->image_caption)) echo $this->item->image_caption; else echo $this->item->title; ?>" />

 

to this:

<img src="<?php echo $this->item->image; ?>" alt="<?php if(!empty($this->item->image_caption)) echo $this->item->image_caption; else echo $this->item->title; ?>" style="width:<?php echo $this->item->imageWidth; ?>px; height:auto;" />

Link to comment
×
×
  • Create New...