Deactivate image crop in portfolio

Hello,

in the portfolio section, the featured images get cropped to a size 280x280px. How I can deactivate this cropping? The problem is, that all my work looks blurred when it gets cropped…

Best regards,
Hannes

Hello Hannes,

You can try to use this PHP snippet in order to do that:

function image_size_override() {
    add_image_size( 'talon-home-large', 560, 560, true );
}
add_action( 'after_setup_theme', 'image_size_override', 11 );

You can add PHP code to your site with Code Snippets plugin (just copy PHP code and paste it in Dashboard → Snippets → Add New after installing and activating the plugin, name the snippet, and click Save Changes and Activate button). Also you can add PHP code directly to functions.php file of your child theme.

Then you can use Regenerate Thumbnails plugin.

You can read about functions that are used in snippet here:
https://developer.wordpress.org/reference/functions/add_image_size/
https://developer.wordpress.org/reference/functions/add_action/

You can read about after_setup_theme hook (that is also used in snippet) here:
https://developer.wordpress.org/reference/hooks/after_setup_theme/

Kind Regards, Roman.