public function setImage($image)
    {
        $this->image = base64_encode($image);

        // create temp file
        $this->tempPath = sys_get_temp_dir() . '/' . uniqid('ladybug_');
        file_put_contents($this->tempPath, $image);
    }