Doesn't work correctly yet: https://poal.co/s/Politics/222935
Resolution's correct but the file size is "189.38 KB" not 31 Byte.
PS: A welcome change overall. Maybe there should be a threshold above which its inserted? Take this very HTML page for example. 72 KB. The resources are another 560 KB. At the very least it doesn't make sense to show it for images under 70-100 KB (edit: although the lack of the size might leave the user puzzled... OK, don't add a threshold).
I see you sorta added resolution for the sake of it, but is it really a needed or interesting information?
Replying to your edit:
At the very least it doesn't make sense to show it for images under 70-100 KB.
That's a fair point. We might consider a threshold then.
I see you sorta added resolution for the sake of it, but is it really a needed or interesting information?
It's a new feature, so if some users don't like it much, we might reduce it like the (domain) information next to link post titles.
Doesn't work correctly yet
Works correctly with non-corrupt metadata from jpg.
The image isn't downloaded, only the metadata are.
I updated my comment with thoughts. Please check it out.
Oh, I didn't know JPEG had this in metadata. Anyway you don't need to download anything, just poke at it with a HEAD request:
curl -sI https://s01.geekpic.net/di-CF3ZOA.png | grep content-length
Output: content-length: 193925
PS: Maybe the HTTP spec requires 'Content-Length' - pay attention to case-sensitivity
The problem with that command is that you have to download the image in its entirety to get its size.
Also poal uses python and JS only.
The code poal uses downloads the header only.
(post is archived)