Skip to content
This repository has been archived by the owner on Sep 8, 2023. It is now read-only.

Bad Request processing failed if image is png #111

Open
Aerglonus opened this issue Jul 12, 2023 · 6 comments
Open

Bad Request processing failed if image is png #111

Aerglonus opened this issue Jul 12, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@Aerglonus
Copy link
Contributor

Making a post with a PNG image it will throw the following error:

await threadsAPI.publish({
    text: '馃 test',
    image: 'https://i.imgur.com/HyfKL15.png',
  });

# rest of response
.....
data: {
      debug_info: {
        retriable: false,
        type: 'ProcessingFailedError',
        message: 'Request processing failed'
      }
    }
@SethuSenthil
Copy link
Contributor

Nice catch! I think we will need to convert this image to a JPG and replace the alpha layer with black by default while also allowing an option for custom colors

@SethuSenthil
Copy link
Contributor

Does this also happen on WebP transparent images as well?

@Aerglonus
Copy link
Contributor Author

Aerglonus commented Jul 12, 2023

Does this also happen on WebP transparent images as well?

Just did a test and yes, it also happens with WebP transparent images

[Edit]
The PNG image I was sending isn't transparent, just a normal PNG image.

@junhoyeo junhoyeo added the bug Something isn't working label Jul 12, 2023
@SethuSenthil
Copy link
Contributor

I'm guessing the PNG file had an alpha layer enabled, although it wasn't being utilized (having an actual transparent element)

@yekayee
Copy link

yekayee commented Jul 13, 2023

Failed to publish: User ID not found

@junhoyeo junhoyeo pinned this issue Jul 14, 2023
@junhoyeo
Copy link
Owner

Nice catch! I think we will need to convert this image to a JPG and replace the alpha layer with black by default while also allowing an option for custom colors

Think this is the best approach here!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants