same image height - portfolio masonry blog style

Hi,

I would like to have the same image height for all portfolio items masonry blog style.

I tried to set it like this:

.img.scale-with-grid, #Content img { height: 330px }

but it affects all images on the site.

Could you recommend a better approach?

Thanks in advance,

Miguel

Background: The source images have different ratios. The grid portfolio won't display the excerpt, so is not an option. Masonry blog style could work, and I already figured out how to limit the excerpt, but the images should have the same height.

Comments

  • Hi,

    To change the size of the images used in portfolio/blog, please navigate to theme options -> blog, portfolio & shop -> featured image.

    Notice!

    Remember to use thumbnail regeneration after you make your changes. Otherwise, the images will not change their size.

    Thanks

  • Thanks!

    I did it for the Blog & Porfolio; I set the new width and height (440x330), select "Resize & Crop", save changes.

    Then Installed the Regenerate thumbnails plugin and Forced Regenerate Thumbnails from the Media Library for the items involved.

    The images will be resized, BUT they won't be cropped - also some images will have a different height than 330px, depending on the ratio of the image. I need the images to be displayed/cropped with same height (330px) in the Portfolio Masonry Blog Style.

  • Are you sure that all of your images are having minimal height value of 330px (declared value) ?

    If they are smaller than declared width and height, then they will stay at the same resolution, they won't be even touched.

    Thanks

  • Thanks Pablo,

    Yes, the original images are having a bigger height than 330px.

    However it seems they won't be cropped with that heigh if the ratio is smaller than 3:4 (for my setting of 440x330). Only linking a featured image with that ratio or bigger will get me the result that I need.

    Probably is because the function first resizes the width and then crops.

    Thanks anyway,

Sign In or Register to comment.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.