Why not just let the clients do it?

Why not just let the clients do it?
Seems like a solution to a problem that doesn't exist unless you're stupid.

Common practice these days to minimize work on the client side and process / cache as much in central servers as possible.

A fuckin' first gen atom can resize an image in reasonably unnoticeable time, however actually doing that for every member of a service on a farm is retarded.

Also, you'd think
>resize image to < 200kb
>upload 200kb
would take less overall user time than
>upload 4mb camera output jpg to resize in the "cloud"

It's not about speed, retard. It's the security of doing it serverside. This is why you aren't on development teams for publicly facing applications.

>This is why you aren't on development teams for publicly facing applications.
I'm pretty sure that's because I'm a NEET with social anxiety

I'm sorry for not being too knowledgeable on the subject, but that's why I'm here. But can I ask how performing the operation serverside is more "secure"?

It's for bandwidth saving, most clients will never look at the full image so there is no point serving it to them.

Same reason this place has shitty thumbnails that could use a few more bytes japmoot pls.

What security? If they can accept a raw payload there's no reason not to accept a scaled payload. Perform the same image validation you would anyway and save yourself a bunch of cpu cycles.

I really don't know what that user is about, but like others metioned it's important for saving bandwidth.

>save bandwidth
>by not having your clients resize their large pictures before sending them to you
???

Because the server is already doing expensive operations checking to see whether the file is malicious, obeys dimensional requirements, doesn't contain any weird payloads, etc. They do the resize operation to standardize how the image is checked and converted, instead of blindly trusting the client to Do The Right Thing™.

Once again, this has nothing to do with bandwidth.

>malicious images
windows was a FUCKING MISTAKE

Are you an idiot or are you just pretending?

Discord already does too many things on the client-side, it's entirely written in node.js and the "native client" is literally an electron wrapper for the web version.
This wouldn't be an issue at all if it was written as a native application, but we can't have those in 2017, so it's done on the back-end.

because then they couldn't get the high resolution copy they use for blackmail purposes

Discord lets you download/view the original full size image, as does Sup Forums.
If the client resized before upload it would only have the crappy downscale to serve to clients and nothing else upon request. Can you imagine if Sup Forums only served thumbs?

Of course it's to do with bandwidth. You can reject an invalid file regardless if it came form your client or not. Sounds to me like you realised your "for security" explanation was BTFO and are now trying to damage control.

nodejs is probably not that well equipped to handle that kind of stuff.

>bandwidth argument

I honestly see no point arguing large scale development with someone who clearly isn't a developer. You win, I guess.

>why does a program do something that clients can do themselves?
There's a word for that: it's called a feature.

Besides, have you SEEN a tech-illeterate's attempt to resize and image? You'll be lucky if it looks this good.

and then there's this retard

Windows is not the only operating system with security vulnerabilities. If I know someone is using a Mac or a Linux machine, I could just as easily create targeted malware for them too.

Both MacOS and Linux security is harder to bypass, especially when they are updated and isn't used with passwordless sudo (wich is practically what Windows do for convenience)

If you are running electron, resizing an image is trivial in comparison to the chromium instance it is running, resource wise.
Image resizing is done on the backend since you still need to have the original quality image available, and uploading 2, maybe 3 versions separately is just retarded.

Because the average discord user is stupid, hence why they are using it.

I don't use discord, but probably they just fucked around with imagemagick and try to being smug about it.

client side != done by the user

i don't think he understands the difference between a client and a user

Why are gamers such pieces of shit, Sup Forums? Why do they continue to line the pockets of non-free software developers and support reactionary politics?

to be fair, client can be used as the program or the user in some cases.
I never paid for discord nor do they show ads?

>make maximum 10 lines of code to resize image, even though you can do it on the client without hiccups
>put it on your servers
>client uploads image > code resizes it > image is posted it
amazing how such a thing could do it for so many images

but probably they just fucked around with imagemagick and try to being smug about it.
no they used opencv.
I am using their library for my imageboardsoftware now.
Much, much faster than before.
Also does webm thumbnailing.

>why don't they do it clientside
So that it can't be missused.
For example by putting the wrong image as the thumbnail and such.

>it doesn't cost money, so it's free!
du bist so dumm

I want to see you create a fast webm thumbnailer in 10 lines of code you fucking retard.
Too good you will never work on anything in your life, or else you'd have to realize how retarded you actually are.

I did not say it's free, I said I did not line's their pockets. Unless they sell the data behind my back. Which I somehow wouldn't doubt. There's no encryption between users afaik

>talking about misuse

Bugs aren't exclusive to Windows you idiot. I recall a gstreamer bug not that long ago that allowed remote code execution.

Thailand gave me a hearty kek. definitely accurate to how bad normies are at resizing

Because it will be abused.

>webm
subject was pictures sweaty :)

Nodejs can import native libraries.

State of Sup Forums: The Post

It's not like they did. Opencv developers did it.

Because if you send someone a link, the server knows if it's been clicked on or not. It used to be a spammer trick in emails to send an image and see if a human looked at the email by asking the server where the image is hosted if the image was requested by anyone. This way spammers can tell if the email is active or not even if you don't respond and trash the email immediately. So for privacy/security, email and chat apps started opening every image that gets sent so it's impossible to tell if it was actually opened by the recipient or not.

ffmpeg -i deez.webm -vframes 1 nuts.jpg

150 million a day sounds like a lot, but is it really? The average image can probably be resized in a fraction of a second on an average computer, and a day is what, 80,000 seconds? This might have been impressive in the 90s but today it sounds like peanuts.

YAY! EVEN MORE SHITTY DEGRADED VERSIONS OF PICTURES FLOATING AROUND THE NET NOW

>Sup Forums is flooded with malicious images

>webm
Shit container
>VP#
Shit encoding

>flac
AAC is better, you autists collect music in .flac purely due to anti-apple autism (even though your loonix system is 60% Apple software) but .aac is better in every conceivable way for lossless.

>with Go and C++
>and C++

really makes you think

do you really think i know what a jay peg is son.gif

aac is lossy retard.

.ALAC is lossless

And .flac is better than both acc alac.

Nuh-uh

And this solution is way more than 10 times slower.
I actually did that before.
Stop being a retard.

Yes, I am talking about it.

I realize that, which is why talking about what they did unnecessary.
They didn't do anything special at all.
Still, it has to be done, and I am glad that they shared their code, because now I don't have to do it myself.
I was already working on my own solution, but this saved me time.

Fuck off apple shill.

Evil hackers are resizing viruses into YOUR images

>he doesn't use 4chanx's "replace thumbnails with actual image" option to screw over gookmoot

Because Big Data. They have to analyze the pictures for terrorists, nazis and faggots anyway.

>How our database stores 150 million images everyday to be sold with the rest of your data