Model/Product/Image.php
private function isFastlyImageOptimizationEnabled()
    {
        if ($this->isFastlyEnabled !== null) {
            return $this->isFastlyEnabled;
        }

        $this->isFastlyEnabled = true;

        if ($this->_scopeConfig->isSetFlag(Config::XML_FASTLY_IMAGE_OPTIMIZATIONS) == false) {
            $this->isFastlyEnabled = false;
        }

        if ($this->_scopeConfig->getValue(PageCacheConfig::XML_PAGECACHE_TYPE) !== Config::FASTLY) {
            $this->isFastlyEnabled = false;
        }

        return $this->isFastlyEnabled;
    }
private function isFastlyImageOptimizationEnabled()
    {
        if ($this->isFastlyEnabled !== null) {
            return $this->isFastlyEnabled;
        }

        $this->isFastlyEnabled = true;

        if ($this->_scopeConfig->isSetFlag(Config::XML_FASTLY_IMAGE_OPTIMIZATIONS) == false) {
            $this->isFastlyEnabled = false;
        }

        if ($this->_scopeConfig->getValue(PageCacheConfig::XML_PAGECACHE_TYPE) !== Config::FASTLY) {
            $this->isFastlyEnabled = false;
        }

        return $this->isFastlyEnabled;
    }
private function isFastlyImageOptimizationEnabled ( ) { if ( $ this -> isFastlyEnabled !== null ) { return $ this -> isFastlyEnabled ; } $ this -> isFastlyEnabled = true ; if ( $ this -> _scopeConfig -> isSetFlag ( Config :: XML_FASTLY_IMAGE_OPTIMIZATIONS ) == false ) { $ this -> isFastlyEnabled = false ; } if ( $ this -> _scopeConfig -> getValue ( PageCacheConfig :: XML_PAGECACHE_TYPE ) !== Config :: FASTLY ) { $ this -> isFastlyEnabled = false ; } return $ this -> isFastlyEnabled ; }
On/Off switch based on config value

@return bool
On / Off switch based on config value