public function display()
    {
        if(isset($this->edited )){
            $image = $this->edited;
        } else {
            $image = $this->original;
        }

        if ($this->type == "jpg")

    {
            header("Content-type: image/jpeg");
            imagejpeg($image);

        } elseif ($this->type == "png") {

            header("Content-type: image/png");
            imagepng($image);

        } elseif ($this->type == "gif") {

            header("Content-type: image/gif");
            imagegif($image);
        }
    }