protected function getClientOptions($model, $attribute)
{
$options = parent::getClientOptions($model, $attribute);
$label = $model->getAttributeLabel($attribute);
if ($this->notImage !== null) {
$options['notImage'] = Yii::$app->getI18n()->format($this->notImage, ['attribute' => $label], Yii::$app->language);
}
if ($this->minWidth !== null) {
$options['minWidth'] = $this->minWidth;
$options['underWidth'] = Yii::$app->getI18n()->format($this->underWidth, ['attribute' => $label, 'limit' => $this->minWidth], Yii::$app->language);
}
if ($this->maxWidth !== null) {
$options['maxWidth'] = $this->maxWidth;
$options['overWidth'] = Yii::$app->getI18n()->format($this->overWidth, ['attribute' => $label, 'limit' => $this->maxWidth], Yii::$app->language);
}
if ($this->minHeight !== null) {
$options['minHeight'] = $this->minHeight;
$options['underHeight'] = Yii::$app->getI18n()->format($this->underHeight, ['attribute' => $label, 'limit' => $this->minHeight], Yii::$app->language);
}
if ($this->maxHeight !== null) {
$options['maxHeight'] = $this->maxHeight;
$options['overHeight'] = Yii::$app->getI18n()->format($this->overHeight, ['attribute' => $label, 'limit' => $this->maxHeight], Yii::$app->language);
}
return $options;
}