Change Divi Filterable Portfolio Grid Thumbnail Sizes

Written by Dan Mossop

The Divi Theme’s filterable portfolio module gives you the option of displaying your projects as a series of thumbnails (grid view). To adjust the size and spacing of the images in your thumbnail grid, you can use the following CSS:

/* Set the image widths */
.et_pb_filterable_portfolio_grid .et_pb_portfolio_item,
.et_pb_filterable_portfolio_grid .column_width,
.et_pb_filterable_portfolio_grid .et_pb_portfolio_image,
.et_pb_filterable_portfolio_grid .et_pb_portfolio_image.portrait img
{
    width: 250px !important;
}
.et_pb_filterable_portfolio_grid .et_pb_portfolio_image img
{
    min-width: 250px;
}

/* Set the image heights */
.et_pb_filterable_portfolio_grid .et_pb_portfolio_image,
.et_pb_filterable_portfolio_grid .et_pb_portfolio_image.landscape img
{
    height: 250px !important;
}
.et_pb_filterable_portfolio_grid .et_pb_portfolio_image img
{
    min-height: 250px;
}

/* Set the spacing between images */
.et_pb_filterable_portfolio_grid .et_pb_portfolio_item { 
	margin-bottom:25px !important; 
	margin-right: 25px !important; 
}

It looks complex, but it’s very simple to change it to suit your needs. There are three parts. First we set the image width to 250px. Then we set the height to 250px (to get square images, in this case). Finally we set the space between adjacent images to be 25px.

The width normally available to the filterable portfolio images is 1080px and if the images are taking up too much space the ones on the end will be pushed down to the next row. So if you want 4 images per row, make sure that 4*width + 4*spacing <= 1080px.

Improve Your Filterable Portfolio with Divi Booster

Upgrade your Divi theme with Divi Booster. Optimize your filterable portfolio and hundreds of other features with ease. This plugin helps you customize thumbnail sizes and spacing effortlessly, making your site look more stunning and professional.

About Dan Mossop

Dan is a Scottish-born web developer, now living in Brisbane with his wife and son. He has been sharing tips and helping users with Divi since 2014. He created Divi Booster, the first Divi plugin, and continues to develop it along with 20+ other Divi plugins. Dan has a PhD in Computer Science, a background in web security and likes a lot of stuff, 

10 Comments

  1. Hello, i try to change height but there is no change, pictures stay croped

    Reply
    • Hi Alina,

      The CSS given in this post adjusts the size that the image displays in the browser. However, in your case, it looks like the image is being cropped on the server before it is sent to the browser.

      I think you should be able to sort it out if you follow the instructions in this post:

      https://www.eleganttweaks.com/divi/changing-portfolio-blog-module-thumbnail-sizes/

      (Use the code block at towards the end of the post that is designed for the portfolio module).

      I see you've also got Optimole doing some processing of the images. If the above post doesn't fix the issue, try temporarily disabling Optimole to check whether or not it is resizing the images.

      Reply
  2. Hi! I have added the CSS necessary to change the size of my portfolio thumbnails however while the box around the image is showing square, the images themselves are still cropping.

    Reply
    • Hi Devin, is there any chance you're able to send me a link to the page with your portfolio so that I can take a look? Thanks!

      Reply
      • Hi dan

        I'm running into the same issue. Could you let me now how this was resolved? Only 3 out of the 6 squares are cutting off for me.

        Thank you

        Reply
        • Hey Melanie, I'm not sure if this one was resolved. Any chance you can send me a link to the affected page so that I can try to find a solution for you? Thanks!

          Reply
  3. Hi, I used your code and et_portfolio_image was change right but not img itself – it´s still cut off as before. Any idea? Thanks.

    Reply
    • Hi Tomas, are you able to send me link to the page you're working on so that I can take a look? Thanks!

      Reply
  4. Hello Dear,

    Is there a way I can show my blog's categories on top of my blog, like a filter?

    I want to implement the same design of filterable portfolio, but instead, not for the portfolio, but for my blog posts.

    Reply
    • Hi Muhammad,

      ​The only way I know how to do it is with the Porfolio Posts Pro plugin. ​It adds three new Divi Builder modules, one of which is the "DP Filterable Blog" module. That module does exactly what you're describing – it displays blog posts using the same design as the filterable portfolio and adds the categories as a filter.

      Hope that helps!

      Reply

Submit a Comment

Comments are manually moderated and approved at the time they are answered. A preview is shown while pending but may disappear if your are cookies cleared - don't worry though, the comment is still in the queue.

Your email address will not be published. Required fields are marked *.

We may earn a commission when you visit links on our website.