WP Divi Stop Featured Image Crop
Stops Divi's Blog, Portfolio and Gallery modules from hard-cropping featured/feed images. Images are scaled to fit instead, preserving aspect ratio. Adds a configurable settings page under the Divi menu and a built-in thumbnail regenerator.
by Dataforge · github.com/dataforge/wp-divi-stop-featured-image-crop · website
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/dataforge/wp-divi-stop-featured-image-crop/releases/download/v1.0.1/wp-divi-stop-featured-image-crop.zipDeclares an update source (https://github.com/dataforge/wp-divi-stop-featured-image-crop), so updates arrive through the plugin's own updater.
Readme
WP Divi Stop Featured Image Crop
Stops Divi's Blog, Portfolio and Gallery modules from hard-cropping featured/feed images. Images are scaled to fit instead, preserving their aspect ratio (cards may have uneven heights). Includes a configurable settings page under the Divi menu and a built-in thumbnail regenerator.
Why
Divi generates fixed-ratio thumbnails for these modules (e.g. 400×284 for the Blog grid) and hard-crops anything that doesn't match — trimming the sides of square images, the top and bottom of portraits, faces out of group photos. This plugin re-registers those image sizes as soft (proportional) crops so the whole image is shown, scaled to fit.
Settings
WP Admin → Divi → Stop Image Crop
- Method
- Resize (recommended) — re-registers Divi's own image sizes as soft crops. Same resolution / file size as Divi default, just uncropped. Run Regenerate now after enabling so existing images rebuild.
- Use original — forces Divi to use the full original image via its
et_pb_(blog|portfolio|gallery)_image_width/heightfilters. No regeneration needed, but serves larger files.
- Per-size enable + max width/height for each Divi image size.
- Per-module toggles for the Use-original method.
- Regenerate now — batched, in-browser thumbnail regeneration (keeps old files, so it's safe to undo).
Reversible: original uploads are never modified; old cropped files are left in place. Deactivate + regenerate to return to Divi's default cropping.
Developer filter
add_filter( 'dfg_dsfic_sizes', function ( $sizes, $settings ) {
// $sizes: [ 'size-name' => [ 'enabled' => 1, 'width' => 400, 'height' => 284 ], ... ]
return $sizes;
}, 10, 2 );
Updates
Self-updating from GitHub Releases via the WordPress Update URI header (WP 5.8+), no
third-party libraries. See dataforge/wp-plugin-updater-guide.
Releasing (automated — Flow A)
- Bump the
Version:header inwp-divi-stop-featured-image-crop.php. - Commit and push to
main. - Tag and push:
git tag vX.Y.Z && git push origin vX.Y.Z.
GitHub Actions then lints PHP, builds the zip with build_plugin.py, and publishes the
release with the zip attached. The workflow fails if the tag doesn't match the header
version.
Requirements
- WordPress 5.8+
- PHP 7.4+
- Divi theme (works with Divi 4 and Divi 5)
Read the full README on GitHub →