[ 'class' => GalleryBehavior::className(), 'type' => 'post_gallery', 'extension' => 'png', 'directory' => Yii::getAlias('@webroot') . '/images/post_gallery/gallery', 'url' => Yii::getAlias('@web') . '/images/post_gallery/gallery', 'versions' => [ 'small' => function ($img) { /** @var \Imagine\Image\ImageInterface $img */ return $img; }, 'medium' => function ($img) { return $img; }, ] ] ]; } }