Today in the php chatroom. Someone posted a mega gif image ~450KB (720x480px). This was automatically downloaded and displayed, but it took a while (on a desktop). Wouldn't it be nice to check the filesize first ?
If it's smaller than say 50KB, then display it otherwise just provide a link to it.

I know this is possible using cURL (POC in PHP). This feature would be really helpful for those who are on a mobile phone or with limited data traffic/speed.

  • 2
    You might want to also show your support on this related post...
    – Lix
    Jun 20, 2013 at 9:17
  • 1
    This depends on the server if sending file-size headers or not. So technically it's not always possible. Then you need to decide what to do if it's not possible. Discard? Grey Box?
    – hakre
    Jun 20, 2013 at 9:24
  • 4
    I welcome you to our gif room: chat.stackexchange.com/rooms/7780/thrills-and-spills
    – Mysticial
    Jun 24, 2013 at 19:23

1 Answer 1


I think best thing would be to outsource core-functionality of this to imgur. They could provide a "preview picture" that deals with all the details and Stack Overflow can just implement it. Same for the linked question.

Sure this is only possible if there is some good rule of thumb, so it's really a specialized job. Hence outsourcing can make sense.

  • 2
    Good idea +1.
    – HamZa
    Jun 20, 2013 at 10:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .