Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • oyvindss Friend
    #177726

    I have a question regarding a hack I’ve done to get custom image sizes.

    I’m sure I’m not the first person in history that has a complaint regarding how K2 handles images. They are only scaled according to width, and not height. That’s not good for for me, who have images in different formats, some portrait, some landscape, some very wide and some quite high.

    So I figured out a hack that I feel is a bit ugly, but it has been effective this far:

    I have overwritten the “[…]_Generic”, “[…]_L” and “[…]_XL” versions of the images stored in mediak2itemscache with custom scaled versions, keeping their original names, thus fooling K2. This seems to overwrite the scaled versions created by K2 when it originally saved the images in the items.

    My question is: does this have any short/long term repercussions that I should be aware of? Since these images are in a folder named “cache”, is there any chance they might be reverted automatically? In other words, is this safe?

    John Wesley Brett Moderator
    #455558

    If you are asking whether ‘Clearing Your Cache” will delete the thumbnails in the K2itemscache – the answer is no. Though we’re scratching our head as to why you don’t simply change the image size settings for K2 rather than all this extra work.

    Regarding repercussions, the images may not appear correctly in various devices.

    Have fun.

    oyvindss Friend
    #455583

    The reason why I use this hack is that the K2 parameters where you control the size of images only uses width. So images in standing format will be much larger on screen than images in e.g. widescreen format.

    I have replaced the default item preview with popup by the way. Described in this thread: http://www.joomlart.com/forums/topic/can-i-remove-the-normal-wall-preview-and-use-a-popup-instead/

    Seems good so far. In what way do you think the images might not appear correctly?

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

This topic contains 3 replies, has 2 voices, and was last updated by  oyvindss 12 years, 5 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum