code: public function checkImageOptimizationStatus()
      {
          $url = $this->_getApiServiceUri(). 'dynamic_io_settings';
          $result = $this->_fetch($url, \Zend_Http_Client::GET);
  
          return $result;
      }
docs: Check if image optimization is enabled for the Fastly service
  
  @return bool|mixed
  @throws LocalizedException