Controller/Adminhtml/FastlyCdn/ImageOptimization/CheckFastlyIoSetting.php
public function execute()
    {
        $result = $this->resultJson->create();
        try {
            $req = $this->api->checkImageOptimizationStatus();

            if (!$req) {
                return $result->setData([
                    'status'    => false,
                    'msg'       => 'Failed to check image optimization status.'
                ]);
            }

            return $result->setData([
                'status'        => true,
                'req_setting'   => $req
            ]);
        } catch (\Exception $e) {
            return $result->setData([
                'status'    => false,
                'msg'       => $e->getMessage()
            ]);
        }
    }
public function execute()
    {
        $result = $this->resultJson->create();
        try {
            $req = $this->api->checkImageOptimizationStatus();

            if (!$req) {
                return $result->setData([
                    'status'    => false,
                    'msg'       => 'Failed to check image optimization status.'
                ]);
            }

            return $result->setData([
                'status'        => true,
                'req_setting'   => $req
            ]);
        } catch (\Exception $e) {
            return $result->setData([
                'status'    => false,
                'msg'       => $e->getMessage()
            ]);
        }
    }
public function execute ( ) { $ result = $ this -> resultJson -> create ( ) ; try { $ req = $ this -> api -> checkImageOptimizationStatus ( ) ; if ( ! $ req ) { return $ result -> setData ( [ 'status' => false , 'msg' => 'Failed to check image optimization status.' ] ) ; } return $ result -> setData ( [ 'status' => true , 'req_setting' => $ req ] ) ; } catch ( \ Exception $ e ) { return $ result -> setData ( [ 'status' => false , 'msg' => $ e -> getMessage ( ) ] ) ; } }
Get Fastly service image optimization status

@return $this|ResponseInterface|ResultInterface
Get Fastly service image optimization status