Following on from the recent blog posts about how to stop the thumbnail from being cropped within the gallery and portfolio modules, here’s how to do it within the blog module.
You need to add the the following code to the functions.php file of your child theme:
// Begin remove Divi Blog Module featured image crop
function pa_blog_image_width($width) {
return '9999';
}
function pa_blog_image_height($height) {
return '9999';
}
add_filter( 'et_pb_blog_image_width', 'pa_blog_image_width' );
add_filter( 'et_pb_blog_image_height', 'pa_blog_image_height' );
// End remove Divi Blog Module featured image crop
You should not add this code to the functions.php file of your main theme as every-time you update the theme you will have to remember re-add the code in, whereas with a child theme the theme code will be kept.