public function updateURL(&$url)
    {
        // Skip if resampling is off, or is already resampled, or is not an image
        if (!Config::inst()->get(get_class($this), 'force_resample') || $this->getVariant() || !$this->getIsImage()) {
            return;
        }

        // Attempt to resample
        $resampled = $this->Resampled();
        if (!$resampled) {
            return;
        }

        // Only update if resampled file is a smaller file size
        if ($resampled->getAbsoluteSize() < $this->getAbsoluteSize()) {
            $url = $resampled->getURL();
        }
    }
public function updateURL(&$url)
    {
        // Skip if resampling is off, or is already resampled, or is not an image
        if (!Config::inst()->get(get_class($this), 'force_resample') || $this->getVariant() || !$this->getIsImage()) {
            return;
        }

        // Attempt to resample
        $resampled = $this->Resampled();
        if (!$resampled) {
            return;
        }

        // Only update if resampled file is a smaller file size
        if ($resampled->getAbsoluteSize() < $this->getAbsoluteSize()) {
            $url = $resampled->getURL();
        }
    }
public function updateURL ( & $ url ) { // Skip if resampling is off, or is already resampled, or is not an image if ( ! Config :: inst ( ) -> get ( get_class ( $ this ) , 'force_resample' ) || $ this -> getVariant ( ) || ! $ this -> getIsImage ( ) ) { return ; } // Attempt to resample $ resampled = $ this -> Resampled ( ) ; if ( ! $ resampled ) { return ; } // Only update if resampled file is a smaller file size if ( $ resampled -> getAbsoluteSize ( ) < $ this -> getAbsoluteSize ( ) ) { $ url = $ resampled -> getURL ( ) ; } }
Update the url to point to a resampled version if forcing

@param string $url
Update the url to point to a resampled version if forcing