Programmatically resize images uploaded
You can Use Image style before save the node.

$original_image = 'public://images/image.jpg';

// Load the image style configuration entity.
use Drupal\image\Entity\ImageStyle;
$style = ImageStyle::load('max_2600x2600');

$uri = $style-&gt;buildUri($original_image);
$url = $style-&gt;buildUrl($original_image);


Here some links may helps you

Drupal 8 - Create an Image and ImageStyle Programmatically

Drupal 8 images with image style

Flexible image style system