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.
Hello, i try to change height but there is no change, pictures stay croped
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.
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.
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!
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
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!
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.
Hi Tomas, are you able to send me link to the page you're working on so that I can take a look? Thanks!
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.
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!