Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.4.2 - No encoder found for media type (application/octet-stream). #308

Open
chudaozhe opened this issue Aug 17, 2024 · 7 comments
Open

Comments

@chudaozhe
Copy link

Version: "mews/captcha": "3.4.2"

Usage

captcha_img('flat')

Return a link

http://blog.cw.net/captcha/flat?0asroCqw

But when I access this url, I get an error

No encoder found for media type (application/octet-stream).

Am I using it the wrong way?

@thelfensdrfer
Copy link

thelfensdrfer commented Aug 21, 2024

I think the error comes from this line:

$this->canvas = $this->imageManager->create($this->width , $this->height)->fill($this->fill);

$this->imageManager->create, returns a octet-stream instead of an image. I just don't know if this was always the case it if it is normal to do so. I guess not.

@thelfensdrfer
Copy link

Version 3.3 works, > 3.4.0 does not.

@HuyPham55
Copy link

Quick fix
In config/captcha, for flat configuration (or any custom configuration that you are having the exception with), turn the background ON by changing:

bgImage => true //initial value: false

Worked for me

@Shadecute
Copy link

I'm also having this issue on the latest version with flat. Changing 'bgImage' to 'true' fixes it.

@Battery9
Copy link

But i want no bg image. Instead a solid color bg.
Apparently that's not possible for now?

@bishutalai07
Copy link

But i want no bg image. Instead a solid color bg.
Apparently that's not possible for now?

Same problem. I don't want bgImage

@TxX8N8LN
Copy link

Thx @HuyPham55 , same bug here, and it's work with your quick fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants