ImageMagick, TinyPNG, WebP... What are your best practices for image optimization?

This page summarizes the projects mentioned and recommended in the original post on /r/webdev

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • next-optimized-images

    🌅 next-optimized-images automatically optimizes images used in next.js projects (jpeg, png, svg, webp and gif).

  • I like your style 😎 Im using next.js for incremental static regeneration . I've been going down rabbit hole after rabbit hole regarding image optization. I found this, https://github.com/cyrilwanner/next-optimized-images .

  • Next.js

    The React Framework

  • Even if you're not using React, it'd be worth checking out their source to see how they pull that off in JS here.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • ImgixSwift

    A Swift client library for generating URLs with imgix

  • There are services like imgix out there which are pretty cost effective and take a lot of the effort out of images. Aside from requesting a specific size and applying transforms in the URL parameters you can also use format=auto which will check the browser's user agent and deliver a compatible, optimized format. Super easy to setup over the top of an existing site too since they have a web folder option which means you can leverage an existing image host. Alternatively you can link it to an S3 bucket.

  • transformimgs

    Open source image CDN.

  • We tried to combine all that and make it easy to use @pixboost. We also have open source version of our image API that you can easily host behind any CDN: https://github.com/Pixboost/transformimgs

  • squoosh

    Make images smaller using best-in-class codecs, right in the browser.

  • In your case a profile image would count as a single master image. You could assume maybe like 5kb for the resized image or just test yourself with their trial or using squoosh. From there you can probably work out how much it's gonna cost as the amount of profile images scale.

  • jpeg-archive

    Utilities for archiving JPEGs for long term storage.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts