Limited Time Sale - 10% Discount! Use Code:U5ZBQTEY

Thumbnail Size

This document explains how to change the thumbnail size in the Portfolio Posts Pro plugin.

By default, the Portfolio Posts Pro plugin will load 400 x 284 thumbnail sizes in the layout. You can change the default width and height values by adding a filter to your child theme’s functions.php file. In the example below, we’ll change the width to 510px and the height to 382px.

add_filter( 'et_pb_portfolio_image_height', 'portfolio_size_h' );
add_filter( 'et_pb_portfolio_image_width', 'portfolio_size_w' );

function portfolio_size_h($height) {
	return '510';
function portfolio_size_w($width) {
	return '382';

Keep in mind that the filter will only work if the thumbnail size actually exists for the size you set. If the thumbnail does not exist, the original image will be loaded, NOT the thumbnail. You can learn more about creating custom thumbnail sizes in the WordPress Docs. Once you create your custom thumbnail size, you’ll need to run the Regenerate Thumbnail plugin to create the new thumbnail size for all of your existing images on your site.

Pin It on Pinterest

Share This