Just In Time Image Optimization at Reddit Scale

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

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • govips

    A lightning fast image processing and resizing library for Go

  • We chose to use govips which is a cgo wrapper around the libvips image manipulation library. The majority of new development for services in our backend is written using baseplate.go. But Go is not an ideal choice for media processing as it cannot keep up with the performance of native code. The most widely used image-processing libraries like libmagick are primarily written in C or C++. Speed was a major factor in selecting libvips in order to keep latency low on CDN cache misses for images. In our tests, libvips was 3–4 times faster than libmagick on basic image processing operations. Content-aware smart cropping was implemented by porting smartcrop.js to Go. This is the only operation implemented in pure Go.

  • baseplate.go

    Reddit's Service Framework in Go

  • We chose to use govips which is a cgo wrapper around the libvips image manipulation library. The majority of new development for services in our backend is written using baseplate.go. But Go is not an ideal choice for media processing as it cannot keep up with the performance of native code. The most widely used image-processing libraries like libmagick are primarily written in C or C++. Speed was a major factor in selecting libvips in order to keep latency low on CDN cache misses for images. In our tests, libvips was 3–4 times faster than libmagick on basic image processing operations. Content-aware smart cropping was implemented by porting smartcrop.js to Go. This is the only operation implemented in pure Go.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • smartcrop.js

    Content aware image cropping

  • We chose to use govips which is a cgo wrapper around the libvips image manipulation library. The majority of new development for services in our backend is written using baseplate.go. But Go is not an ideal choice for media processing as it cannot keep up with the performance of native code. The most widely used image-processing libraries like libmagick are primarily written in C or C++. Speed was a major factor in selecting libvips in order to keep latency low on CDN cache misses for images. In our tests, libvips was 3–4 times faster than libmagick on basic image processing operations. Content-aware smart cropping was implemented by porting smartcrop.js to Go. This is the only operation implemented in pure Go.

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