3 ms·
It's probably a bit harder at Twitter's unique scale. They have an incredibly high throughput of new posts and a large portion of these posts include between 1-
by mattacular 5y ago
It's probably a bit harder at Twitter's unique scale. They have an incredibly high throughput of new posts and a large portion of these posts include between 1-4 images that need cropping.
- kixiQu 5y agoI dunno, that just means it's a pain for the user, not for Twitter
- bavell 5y agoIsn't this just a UI change and wiring that up to the backend? The cropping happens either way, it might actually be faster considering that if the user providers the crop info, Twitter does't have to burn CPU cycles on figuring out the "optimal" crop dimensions.
- rabuse 5y agoYou can crop images with JS. I've had to implement it a couple times.
- Spivak 5y ago/s? I mean we’re talking about a client-side feature here. If phpbb forums can do per-image cropping I think Twitter can manage.
- mattacular 5y agoWell, no it wasn't sarcasm... if Twitter can offload image attach and crop entirely onto the client, I figure they would be doing that. Certainly their frontend engineers understand how to. But they must have some reasons for involving the server. Because they do! If you go attach an image to a new tweet, you will see it gets uploaded right then and there, whether or not you ever hit post. Who knows what happens from there. Allowing clients to demand more crop work, at will, on top of the one that is automatic seems like it would have some implications at twitter's scale. At the very least, it would probably undo some optimizations they've made around image handling.