public function init() {
		parent::init();

        // If cachePath is not an array? Create an array
        if(!is_array($this->cachePath)){
            $this->cachePath = [$this->cachePath];
        }

		// Initialize the compontent with the configuration loaded from config.php
		\Yii::$app->set('imageresize', [
			'class' => 'noam148\imageresize\ImageResize',
			'cachePath' => $this->cachePath,
			'useFilename' => $this->useFilename,
			'absoluteUrl' => $this->absoluteUrl,
		]);

		if (is_callable($this->databaseComponent)) {
		    // The database component is callable, run the user function
		    $this->databaseComponent = call_user_func($this->databaseComponent);
        }

        // Check if the user input is correct
        $this->_checkVariables();
	}