this post was submitted on 04 Mar 2025
7 points (100.0% liked)
Explain Like I'm Five
15117 readers
8 users here now
Simplifying Complexity, One Answer at a Time!
Rules
- Be respectful and inclusive.
- No harassment, hate speech, or trolling.
- Engage in constructive discussions.
- Share relevant content.
- Follow guidelines and moderators' instructions.
- Use appropriate language and tone.
- Report violations.
- Foster a continuous learning environment.
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
JavaScript can do that, but it would be JavaScript running on the server. Any language capable of working with images and http will be able to do this.
If you're running JavaScript in the browser, any kind of operation on the image would require the image to be downloaded from the server first. You can't resize an image without the image after all. Which I think is where you're getting your wires crossed, a Kotlin app already has the file, a browser does not.
One of the main things you need to care about optimising for a web application is sending as little as possible over the network, so you do anything like image resizing either at dev/build-time or on-the-fly server side. There's little point doing it client-side because the comparatively time consuming part of getting it transferred is already done
thank you!
If you’re interested Vite is a common build tool for preprocessing a bunch of different files so they can be served efficiently—and there’s plugins for it for image processing where everything is handled automatically