[HN Gopher] Show HN: I built PixSpeed to optimize website images...
___________________________________________________________________
Show HN: I built PixSpeed to optimize website images for free
Author : lou_alcala
Score : 22 points
Date : 2024-10-29 22:57 UTC (3 days ago)
(HTM) web link (pixspeed.com)
(TXT) w3m dump (pixspeed.com)
| lou_alcala wrote:
| Hey HN, I created PixSpeed to optimize images for my own
| websites. While tools like TinyPNG are fantastic, I wanted a more
| custom solution. PixSpeed compresses PNG, JPEG, and WebP images
| efficiently, helping to improve site loading times without
| compromising quality. I've been using it myself and hope it can
| be useful for others as well. The tool is completely free. I'd
| love to get feedback on what could make PixSpeed even better.
| Thanks!
| brudgers wrote:
| _The tool is completely free_
|
| Long term, how do you intend to sustain the service if users
| become dependent on it and need to use it at scale?
|
| How do you intend to maintain reliability and uptime for users
| whose business depends on access to the service?
|
| What happens to users if/when you lose interest/ability to
| continue the project?
|
| Don't get me wrong, you don't owe other people anything. On the
| other hand, free is often a way of avoiding really hard (and
| very interesting) engineering problems. People are the hard
| part of engineering.
| turtlebits wrote:
| If people aren't paying, none of those are problems. The
| second you charge, that's when the headaches come.
| jasonjmcghee wrote:
| "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.
| JTyQZSnP3cQGa8B wrote:
| Or why is it not a simple shell call to Imagemagick?
| aniviacat wrote:
| 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).
| markdown wrote:
| > 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.
| djoldman wrote:
| > By clicking the Submit button you automatically accept our
| policies. Please take a momento to read them.
|
| You can make it easier for your users to read the policies if
| "policies" is a link to your policies. Also, I think you mean
| "moment to" instead of "momento."
| SCUSKU wrote:
| Awesome stuff, would love if there were a total tally at the
| bottom that indicated the before and after size and percent
| difference! E.g. before: 10MB, after: 2MB, change: -80%
| valbaca wrote:
| nit: "Please take a momento to read them."
|
| Should say "Please take a moment to read them.
| naberhausj wrote:
| The best feature of my purpose-built static site generator is
| that it automatically builds (mostly) optimized WEBPs from any
| source image [1]. Not only does it reduce the image size, but it
| outputs many sizes of the image so that I can use an image
| `srcset`. The browser then automatically downloads the optimally
| sized image for the element.
|
| It's a game changer to be able to copy photos directly from my
| Google Photos and not worry about it bloating my web pages.
|
| [1]
| https://github.com/JosephNaberhaus/naberhausj.com/blob/05846...
| Syonyk wrote:
| If you're using Jekyll, Jekyll Picture Tag
| (https://github.com/rbuchberger/jekyll_picture_tag) does the
| same thing. I use that in my pipeline for my blog, and I agree,
| it's very nice to just not have to worry about stuffing a 5MB
| image down someone's tiny cell phone connection.
|
| Though I'm not sure many browsers actually _use_ anything other
| than the largest image option...
|
| I've debated encoding to AVIF as well, but that's such a
| painfully long process on a blog with somewhere around 8700
| images.
| powersnail wrote:
| I've done a similar thing[^1] as well, but as a post-processing
| step after Hugo build my site, because I haven't written my own
| static site generator (yet).
|
| [^1]:
| https://github.com/PowerSnail/PowerSnail.github.io/blob/mast...
| jszymborski wrote:
| This is also pretty easy is Hugo, albeit maybe less automatic
| [0]. {{ $image.Resize "600x webp q50" }}
|
| [0] https://gohugo.io/content-management/image-processing/
| sangeeth96 wrote:
| Since I'm committing my blog into git, I found it better to
| pre-optimize my images so that my repo won't balloon. At first,
| I wrote a script that simply `find`s my non-WebP images, turns
| them into WebP. It then looks for those image references in my
| *.md files and replaces the extension with WebP.
|
| But now, I have a better workflow where I use the Image
| Converter plugin[^1] in Obsidian since that's how I'm composing
| my notes primarily. As I paste the images into the markdown
| file, it gets converted and embedded. There's also Clop[^2] for
| macOS which auto converts if I copy an image/file to my
| clipboard into my desired format and quality.
|
| Quite happy with this setup for the time being.
|
| [^1]: https://github.com/xRyul/obsidian-image-converter [^2]:
| https://lowtechguys.com/clop/
___________________________________________________________________
(page generated 2024-11-01 23:01 UTC)