threads-api icon indicating copy to clipboard operation
threads-api copied to clipboard

Bad Request processing failed if image is png

Open Aerglonus opened this issue 1 year ago • 6 comments

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'
      }
    }

Aerglonus avatar Jul 12 '23 04:07 Aerglonus

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 avatar Jul 12 '23 06:07 SethuSenthil

Does this also happen on WebP transparent images as well?

SethuSenthil avatar Jul 12 '23 06:07 SethuSenthil

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.

Aerglonus avatar Jul 12 '23 06:07 Aerglonus

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

SethuSenthil avatar Jul 12 '23 18:07 SethuSenthil

Failed to publish: User ID not found

yekayee avatar Jul 13 '23 10:07 yekayee

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!

junhoyeo avatar Jul 14 '23 03:07 junhoyeo