get_body() ); $image_ids = $body->image_ids ?? null; if ( empty( $image_ids ) ) { return $this->respond_success_json([ 'status' => [], ]); } return $this->respond_success_json([ 'status' => Optimization_Status_Controller::get_images_optimization_statuses( $image_ids ), ]); } catch ( Throwable $t ) { return $this->respond_error_json([ 'message' => $t->getMessage(), 'code' => 'internal_server_error', ]); } } }