I want to add Captcha verification on login page. But there is an error, captcha image is not showing and when I try to view the captcha image http://xxx.yii2/site/captcha?v=5806eb0c3aa05 , below error display
The image “http://xxx.yii2/site/captcha?v=5806ce094fa84” cannot be displayed because it contains errors.
Below is my SiteController
class SiteController extends Controller {
  public function behaviors()
  {
    return [
        'access' => [
            'class' => AccessControl::className(),
            'only' => ['logout','resetPassword'],
            'rules' => [
                [
                    'actions' => ['logout','resetpassword'],
                    'allow' => true,
                    'roles' => ['@'],
                ],
            ],
        ],
        'verbs' => [
            'class' => VerbFilter::className(),
            'actions' => [
                'logout' => ['post'],
            ],
        ],
    ];
}
public function actions()
{
    return [
        'error' => [
            'class' => 'yii\web\ErrorAction',
        ],
        'captcha' => [
            'class' => 'yii\captcha\CaptchaAction',
            'fixedVerifyCode' => YII_ENV_TEST ? 'testme' : null,
        ],
    ];
} 
LoginForm controller
class LoginForm extends Model {
  public $username;
  public $password;
  public $rememberMe = true;
  public $verifyCode;
  private $_user = false;
  const ERROR_NONE=0;
  const ERROR_USERNAME_INVALID=1;
  const ERROR_USERNAME_LOCKED = 3;
  const ERROR_USERNAME_INACTIVE = 4;
  const ERROR_PASSWORD_INVALID=2;
  public $role_id;
  public $salt;
  public $_id;
  private $_identity;
  /**
   * @return array the validation rules.
   */
  public function rules()
  {
    return [
        [['username', 'password'], 'required'],
        ['rememberMe', 'boolean'],
        ['username','validateMember'],
        ['password', 'validatePassword'],
        ['verifyCode', 'captcha'],
    ];
  } 
Login form view
<?php $form = ActiveForm::begin([
    'id' => 'login-form',
    'options' => ['class' => 'form-horizontal'],
    'fieldConfig' => [
        'template' => "{label}\n<div class=\"col-lg-3\">{input}</div>\n<div class=\"col-lg-8\">{error}</div>",
        'labelOptions' => ['class' => 'col-lg-1 control-label'],
    ],
]); ?>
    <?= $form->field($model, 'username') ?>
    <?= $form->field($model, 'password')->passwordInput() ?>
    <?= $form->field($model, 'verifyCode')->widget(Captcha::className()) ?>
    <?= $form->field($model, 'rememberMe')->checkbox([
        'template' => "<div class=\"col-lg-offset-1 col-lg-3\">{input} {label}</div>\n<div class=\"col-lg-8\">{error}</div>",
    ]) ?>
    <div class="form-group">
        <div class="col-lg-offset-1 col-lg-11">
            <?= Html::submitButton('<i class="fa fa-sign-in fa-fw"></i> Login', ['class' => 'btn btn-primary', 'name' => 'login-button']) ?>
        </div>
    </div>
<?php ActiveForm::end(); ?>