I'm saving an image via File Upload field and it's path is stored in user metadata. So far so good.
I now need to grab that image and resize it. I'm trying to do it with wp_get_image_editor() as following:
$image = wp_get_image_editor( $file ); where $file is the correct path to the image.
However, this returns the following error:
 => WP_Error Object ( [errors] => Array ( [invalid_image] => Array (  => File is not an image. ) ) [error_data] => Array ( [invalid_image] => http://example.com/wp-content/uploads/gravity_forms/13-37ec33fbff5089a494d9ad0574a67403/2013/05/la-fitness.jpg ) )
Any idea what might be wrong? Maybe I need to pass mime type to wp_get_image_editor()? I don't know how to do it.
I would hugely appreciate any help.