Keyword

K2 Catalog Mode - Item Image sizes on Item Page

More
9 years 7 months ago #141315 by alexp
K2 2.6.9
Catalog Mode
Joomla 3.3.6

Wondering if we should be seeking an override or looking for a K2 plugin.

Because K2 currently only allows defining the width of item images, when they display on the item page the various formats (portrait and landscape) result in dramatic variations in sizes.

We require a way to be able to limit both the width and the height. Or define an area on the Item page that the item image will display within(?)

For example: we've selected 'medium' as the K2 image size to display on the item page, in parameters we've set medium at 400px wide. When we upload an image that is landscape format, with a ratio say 2:1, we get an image on the Item page that's 400px wide x 200px high.

Uploading another image with the opposite ratio 1:2 (portrait format) will end up being 400px wide x 800px high. A big difference if the images are actually the same size, just different formats (portrait vs landscape)

And worse if a portrait image has a ration of 3:1, the item image will end up displaying as 400px wide x 1200px high on the item page. If that image is horizontal then it becomes only 400px wide x 133px.

Any suggestions on how best to address this?

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 7 months ago #141319 by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 Catalog Mode - Item Image sizes on Item Page
Hello,

You can set a maximum height on the image's container and overflow:hidden. This way you can hide the excess part of the image.

If you want to crop the actual image you need to use a 3rd party extension. I have not used one in the past so I cannot recommend something.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
9 years 7 months ago #141327 by alexp
Hi Krikor,

For this project/client I'm required to allow for the Item image to display in it's entirety (on Item page). And uploaded images will be of various formats & ratios. Thus the challenge.

So I don't have the option to hide the excess in this case.

All post production of photographs will be done by client prior to uploading to the web site. So they are all ready to go. No cropping needed/wanted. So the site doesn't need to be able crop images. - so that part is ok.

I just need to be able to display the images within a reasonable area and not have them dramatically jumping about.

I'm a bit stumped at the moment. I hope I am explaining the issue clearly. I could visually illustrate the layout if that would help.

I think I require K2 to be able to create the Item images by setting height, as well as the width? Which brings us back to the parameter settings.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 7 months ago #141358 by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 Catalog Mode - Item Image sizes on Item Page
If you cannot crop them, align them to the middle, set the container to a reasonable height and set max-height: 100% and width: auto;

This will enforce a maximum height without cropping the image. It might create borders or the sides though, but I do not think you have another option if you do not want to crop the image.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum