Change Divi Filterable Portfolio Grid Thumbnail Sizes

This post may contain referral links which may earn a commission for this site

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.

Hundreds of new features for Divi
in one easy-to-use plugin

8 Comments

  1. 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
  2. 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
  3. 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

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