public function actionUpdateImage($id)
    {
        $model = $this->module->manager->findGalleryImageById($id);
        if ($model === null) {
            throw new NotFoundHttpException('The requested image does not exist');
        }
        $model->scenario = 'update';

        $gallery = $this->findModel($model->gallery_id);

        if ($model->load(\Yii::$app->request->post()) && $model->save()) {
            if(\Yii::$app->request->get('returnUrl')){
                $back = urldecode(\Yii::$app->request->get('returnUrl'));
                return $this->redirect($back);
            }

            \Yii::$app->getSession()->setFlash('gallery.success', \Yii::t('gallery', 'Image has been updated'));
            return $this->refresh();
        }

        return $this->render('image/update', [
            'model' => $model,
            'gallery' => $gallery
        ]);
    }