For others who may run into this same issue:
I found a 'hacky' way of preventing this from happening without needing to ruin your image quality settings.
Navigate to your
\components\com_k2\templates directory and edit your
generic.php file. Search for a line that starts with:
<img src="<?php echo $this->item->image; ?> and delete that whole line of code.
In its place, put the following lines:
- Code: Select all
<?php list($width, $height, $type, $attr) = getimagesize($this->item->image);
if ($height > $width ) { ?>
<img src= "<?php echo $this->item->image; ?>" alt="<?php if(!empty($item->image_caption)) echo $item->image_caption; else echo $item->title; ?>" style="height:<?php echo $this->item->imageWidth; ?>px; width:auto;" />
<?php } else { ?>
<img src= "<?php echo $this->item->image; ?>" alt="<?php if(!empty($item->image_caption)) echo $item->image_caption; else echo $item->title; ?>" style="width:<?php echo $this->item->imageWidth; ?>px; height:auto;" />
<?php } ?>
This works because apparently K2 only sizes images by width normally, and this code instead allows for it to use width or height. This will also improve image quality on search and author pages as well.
Solution source: http://www.zandergraphics.net/index.php?option=com_k2&view=item&id=111:k2-images