Okay
  Public Ticket #1918384
Portfolio Page Grid - Make all images in row same height
Closed

Comments

  •  3
    Peter started the conversation

    Hi

    I'm hoping you can help. As you can see from your demo page, often the portfolio grid will have a masonry effect https://demo.kaliumtheme.com/main/portfolio-3-col/

    I would like to achieve the effect where all images in a single row have the same height irrespective of whether the image is landscape or portrait. This website is a good example of what I'm trying to achieve (it's not a kalium theme but it's a good example) https://www.indiahobson.co.uk/

    I thought that turning 'dynamic image height' to no would do this but it doesn't seem to.

    Thanks

    Pete


  •  3
    Peter replied

    Sorry, it's also worth mentioning that I do not want to crop the images. I still want it to show the full dimensions of each image as in the example I sent

  •  1,559
    Laborator replied

    Hi Peter,

    To achieve the look like in the site you mentioned you have to use Masonry Portfolio Items so you can manually select for each item how large it will be, here you can find the examples of our Masonry Portfolio:

    1. Example 1
    2. Example 2
    3. Example 3

    Best regards,
    Laborator Team


      Documentation         Join Kalium Users Group

  •  3
    Peter replied

    Thanks Art. Just to be sure I've understood correctly, you need to set each item within the portfolio individually ie it cannot be automated. Is that correct? Would you mind point me to the correct setting or KB article that explains this?

    Thanks

  •  1,559
    Laborator replied

    Hi Peter,

    Unfortunately this is not explained in our documentation so I have recorded my screen to show you how it works and where you can find it:

    https://d.pr/v/lbiuIV

    Best regards,
    Laborator Team


      Documentation         Join Kalium Users Group

  •   Peter replied privately
  •  3
    Peter replied

    Hi

    Have you had a chance to look at this? I'd like to see if the is a way to prevent the grid from cropping the image height

    Thanks

    Pete

  •  1,559
    Laborator replied

    Hi Peter,

    To show a perfect grid with images like the masonry grid is not possible without cropping the images, otherwise all the images have to be 100% on the same size and the grid will be perfect, you cannot have a grid with masonry images without cropping them.

    Best regards,
    Laborator Team


      Documentation         Join Kalium Users Group

  •  3
    Peter replied

    Hi Art

    Thanks for responding. The main issue for me is that it crops the image when it drops down to the single column mobile view (see attachment). The 2 column is not so much of an issue as I could change the break point to go from 3 to 1 columns. Is it possible to stop the image from being cropped in the single column view?

    Thanks

    Pete

  •  1,559
    Laborator replied

    Hi Peter,

    I see you are not using Masonry Portfolio Items here, so all what was needed is to set the Dynamic Image Height to Yes.

    Best regards,
    Laborator Team


      Documentation         Join Kalium Users Group

  •  3
    Peter replied

    Hi Art

    I'm using 'masonry portfolio' rather than 'portfolio items'. I'm using this so I have the flexibility of specifying how the images are arranged in a 3 or 4 column view. On the desktop view, it works really well. My issue is when you are in the mobile view as it drastically crops the image down. It would be great if I could keep the desktop view as it is, and prevent the mobile view from cropping and show the image at 100% height. I have looked and 'masonry portfolio' does not have the option to set dynamic image height.

    NB - I know I only have 2 images on the page. It's just a test page until I understand how to use it better.

    Thanks

    Pete

  •  1,559
    Laborator replied

    Hi Pete,

    I have added this code to the functions.php file of the Child Theme, now the images in mobile should appear in their original image ratio.

    Best regards,
    Laborator Team


      Documentation         Join Kalium Users Group

  •  3
    Peter replied

    Hi Art

    Thanks for fixing this. Is this the code you added (you missed it off your last message)

    function kalium_portfolio_masonry_mobile_image_large( $size ) {
            return 'large';
    }

    add_filter( 'kalium_portfolio_masonry_mobile_image', 'kalium_portfolio_masonry_mobile_image_large' );

    Also, I'm interested in how you added the code as I get an error when trying to add code via 'appearance' > 'theme editor'. Apparently there is a known issue with my hosting company that prevents this from working on my staging site. 

    Thanks

    Pete

  •  1,559
    Laborator replied

    Hi Pete,

    Yes that's the code I have added, sorry my mistake as I wanted to paste the code here. I have installed the AceIDE plugin to make changes to your site as I could not do this under Appearance > Theme Editor.

    Best regards,
    Laborator Team


      Documentation         Join Kalium Users Group

  •  3
    Peter replied

    Thank you :)