Hi @dominiek,

Here's that state of image uploading and the Twitter API (and website):

Up until very recently, image upload via the API or on the site was a bit of
a crap shoot -- it was a synchronous process, and if our servers couldn't
process the image quickly enough or ran into any problems, it would throw a
500 error. My own personal estimate was that about 3/5ths of the time you
tried to perform an image upload operation, you'd get an error.

Recently, an engineer began refactoring our image upload process so that it
was an asynchronous process. This means that in most cases, we'd acknowledge
an image upload as it was received, and unless there was anything
particularly problematic about the upload, we'd return a 200 status code,
put the image in a queue, and after processing, update the image on record.
This means from an API perspective, you now need to check back later to see
what the new image URL is. We're still working through these implications,
but the move to an async model was a requirement to be able to service these
uploads at all.

Now, meanwhile when the async service was developed, the image manipulation
libraries used were also changed. This is what's resulted in the "black bar"
effect you've noticed.

Long story short, we're continuing to iterate on this issue and tweak the
image manipulation routines we are using. I'd recommend when uploading
images that you assure they are as square as possible before upload, but
overall, this is something we (Twitter) need to fix so that its behavior is
more deterministic.

Taylor


On Mon, Aug 2, 2010 at 9:53 AM, dominiek <i...@dominiek.com> wrote:

>
> Hi there,
>
> My name is Dominiek ter Heide and I have a little gimmicky project
> called Blinkly, slick profile image overlays: http://blink.ly/
>
> Ever since about a month ago I've been experiencing some problems with
> image uploading through the REST API. I managed to fix this (meaning
> less failures) by using the V1 API, other developers with this problem
> should look into this!
>
> However, every time I upload an image through the API or through the
> website even, it scales it down in a strange way. When the aspect
> ratio wasn't squared, it used to crop it in a smart way. Right now
> however, black borders are added to all uploaded images. E.g.
> http://a0.twimg.com/profile_images/1093873780/blink_23.jpg
>
> Are the Twitter devs changing this back to the smart cropping like it
> used to? If so, I will not bother in adjusting my backend and cope
> with the glitch for now.
>
> Sincerely,
>
> @dominiek
>

Reply via email to