Model/Product/Image.php
public function getFastlyUrl()
    {
        $baseFile = $this->getBaseFile();
        $url = $this->getBaseFileUrl($baseFile);

        $imageQuality = $this->_scopeConfig->getValue(Config::XML_FASTLY_IMAGE_OPTIMIZATION_IMAGE_QUALITY);

        $this->setQuality($imageQuality);

        $this->fastlyParameters['quality'] = $this->_quality;

        if ($this->_scopeConfig->isSetFlag(Config::XML_FASTLY_IMAGE_OPTIMIZATION_BG_COLOR) == true) {
            $this->fastlyParameters['bg-color'] = implode(',', $this->_backgroundColor);
        }
        if ($this->_keepAspectRatio == true) {
            $this->fastlyParameters['fit'] = 'bounds';
        }
        $this->fastlyUrl = $url . '?' . $this->compileFastlyParameters();
    }
public function getFastlyUrl()
    {
        $baseFile = $this->getBaseFile();
        $url = $this->getBaseFileUrl($baseFile);

        $imageQuality = $this->_scopeConfig->getValue(Config::XML_FASTLY_IMAGE_OPTIMIZATION_IMAGE_QUALITY);

        $this->setQuality($imageQuality);

        $this->fastlyParameters['quality'] = $this->_quality;

        if ($this->_scopeConfig->isSetFlag(Config::XML_FASTLY_IMAGE_OPTIMIZATION_BG_COLOR) == true) {
            $this->fastlyParameters['bg-color'] = implode(',', $this->_backgroundColor);
        }
        if ($this->_keepAspectRatio == true) {
            $this->fastlyParameters['fit'] = 'bounds';
        }
        $this->fastlyUrl = $url . '?' . $this->compileFastlyParameters();
    }
public function getFastlyUrl ( ) { $ baseFile = $ this -> getBaseFile ( ) ; $ url = $ this -> getBaseFileUrl ( $ baseFile ) ; $ imageQuality = $ this -> _scopeConfig -> getValue ( Config :: XML_FASTLY_IMAGE_OPTIMIZATION_IMAGE_QUALITY ) ; $ this -> setQuality ( $ imageQuality ) ; $ this -> fastlyParameters [ 'quality' ] = $ this -> _quality ; if ( $ this -> _scopeConfig -> isSetFlag ( Config :: XML_FASTLY_IMAGE_OPTIMIZATION_BG_COLOR ) == true ) { $ this -> fastlyParameters [ 'bg-color' ] = implode ( ',' , $ this -> _backgroundColor ) ; } if ( $ this -> _keepAspectRatio == true ) { $ this -> fastlyParameters [ 'fit' ] = 'bounds' ; } $ this -> fastlyUrl = $ url . '?' . $ this -> compileFastlyParameters ( ) ; }
Creates a url with fastly parameters
Creates a url with fastly parameters