Limit dimensions of “Full” size images

So I’ve found this WP_Image_Editor in the CodeX. Basically by adding the code below it should automatically resize an image 🙂

Code:

$image = wp_get_image_editor( 'cool_image.jpg' ); // Return an implementation that extends WP_Image_Editor

if ( ! is_wp_error( $image ) ) {
    $image->resize( 300, 300, true );
    $image->save( 'new_image.jpg' );
}

I don’t know exactly if this will work but I’m sure if you look in the link I’ve gave you then you should be able to find it there.

Best of luck 🙂