WP_get_image_editor resizing images in a foreach loop
wp_get_image_editor can return a WP_Error object, which appears to be what’s happening in the code. The code never checks for this and tries to resize an image, thinking it’s calling resize on an image editing object. You need to make 2 adjustments: check if $editor is a WP_Error object add code to print out the … Read more