change deprecated image_resize function to wp_get_image_editor + make sure the directory exists before finding poster item

Changed deprecated image_resize function to wp_get_image_editor