News for hackers. Stuff that matters.
Re:Show HN: I built PixSpeed to optimize website images for ... by jasonjmcghee on Friday November 01, 2024 @02:49PM (#42020269)
"All images are deleted after 1 hour" - so they're using a server and it's a valid ask.

My question is - why does this require a server?

Write it in something that compiles to LLVM / WASM and just make a static page. Infinitely scalable and just pay for the domain (and CDN provider if applicable) both likely nominal cost.

Re:Show HN: I built PixSpeed to optimize website images for ... by JTyQZSnP3cQGa8B on Friday November 01, 2024 @03:42PM (#42020761)
Or why is it not a simple shell call to Imagemagick?
Re:Show HN: I built PixSpeed to optimize website images for ... by kelvinjps10 on Friday November 01, 2024 @09:45PM (#42023411)
Then it needs a server
Re:Show HN: I built PixSpeed to optimize website images for ... by solardev on Saturday November 02, 2024 @11:36AM (#42027007)
Not if you port the shell and OS and ImageMagick to WASM first!
Re:Show HN: I built PixSpeed to optimize website images for ... by fuglede_ on Saturday November 02, 2024 @02:18PM (#42028124)
ImageMagick in Wasm lets you do lots of nifty stuff client-side. Here's a photocopy simulation thingie I made for instance: https://photocopy.fuglede.dk/
Re:Show HN: I built PixSpeed to optimize website images for ... by solardev on Saturday November 02, 2024 @02:43PM (#42028294)
That is fun indeed :) Good effect!
Re:Show HN: I built PixSpeed to optimize website images for ... by aniviacat on Friday November 01, 2024 @04:34PM (#42021275)
It can pull images from a domain. That would be difficult (since for client-side rendered sites it would require loading the site in a sandboxed environment) or impossible (if the site actively prevents that using CORS or similar, or if it happens to include scripts which expect to be run in a normal environment).
Re:Show HN: I built PixSpeed to optimize website images for ... by jasonjmcghee on Friday November 01, 2024 @07:55PM (#42022792)
Yup totally fair - would likely require you upload the images manually for pure client-side.

You might still be able to offset a portion of the compute by just figuring out the URLs of the images on the back-end, sending that list to the client, which would then download and do the optimization / resizing.

Re:Show HN: I built PixSpeed to optimize website images for ... by siamese_puff on Tuesday November 05, 2024 @12:51AM (#42048923)
There is also the ability to run things like Playwright on the edge a la Cloudflare Workers. You can fallback to rendering JS required sites through that and do clientside imagemagick WASM shenanigans on the client once the worker returns direct links to all the images.
Re:Show HN: I built PixSpeed to optimize website images for ... by markdown on Friday November 01, 2024 @05:37PM (#42021799)
> Write it in...

I look forward to your version of this service, also to be provided for free, right? And for your sake, hopefully you won't have people in the comments demanding that you completely redo your project in the special way that suits them.

Re:Show HN: I built PixSpeed to optimize website images for ... by jasonjmcghee on Friday November 01, 2024 @07:40PM (#42022679)
> Long term, how do you intend to sustain the service if users become dependent on it and need to use it at scale? ...

Is what I was responding to. Wasn't criticizing the posted product implementation choices or demanding a rewrite. I see how it could be read that way, which is unfortunate.

Parent comment asked a number of questions that all suggested a server was a requirement. If scale becomes any issue for a service like this, there are approaches other than shutting down the service due to server / maintenance costs.