public function render($image, $template = null, $htmlAttribs = array(), $partial = null) {
        if ($this->_isFilename($image)) {
            // When calling for a static image, you can use the second param as $htmlAttribs.
            $htmlAttribs = $template ?: array();
            return $this->_renderStatic($image, $htmlAttribs);
        }
        if (!$template) {
            throw new Exception(self::ERROR_SCALING_TEMPLATE_MISSING);
        }
        return $this->_renderUpload($image, $template, $htmlAttribs, $partial);
    }