code: public function init()
      {
  
          if (!$this->attribute) {
              throw new InvalidConfigException(Yii::t('wavecms/main', 'Property "attribute" is not defined in ImageBehavior'));
          }
  
          if (!is_array($this->sizes)) {
              throw new InvalidConfigException(Yii::t('wavecms/main', 'Property "sizes" is not defined in ImageBehavior'));
          }
  
          parent::init();
      }
docs: Init function
  @inheritdoc
  @throws InvalidConfigException