Model/Api.php
public function checkImageOptimizationStatus()
    {
        $url = $this->_getApiServiceUri(). 'dynamic_io_settings';
        $result = $this->_fetch($url, \Zend_Http_Client::GET);

        return $result;
    }
public function checkImageOptimizationStatus()
    {
        $url = $this->_getApiServiceUri(). 'dynamic_io_settings';
        $result = $this->_fetch($url, \Zend_Http_Client::GET);

        return $result;
    }
Check if image optimization is enabled for the Fastly service

@return bool|mixed
@throws LocalizedException