This is an experimental project based on the interest of AVIF, AV1 image file format.
The main purpose is to integrate AVIF with Rails and paperclip, and test how much the performance might be affected.
The project allows the user to compress their uploaded photo to AVIF and record the time spent.
If the photo requires any further processing like resizing, ImageMagick will handle it first.
AVIF is an image file format introduced and open-sourced by NetFlix with better compression efficiency.
Although it is only supported in a few browsers (chrome and firefox) at the moment, it has shown a better compression ratio than existing image formats like JPG and PNG. It is not widely supported yet, but with the growing concern among tech companies, it worth keeping an eye on it.
To compress an image to AVIF format, libavif library needs to be installed.
libavif
allows encoding and decoding on AVIF.
If you are mac or ubuntu user, you can install it with the following guide.
brew install libavif
Follow the guide and Install this package
- Remind: This is a package for amd64 CPU, you can find another version in this page
Add the source to the list: sudo apt edit-sources
Then run the update: sudo apt-get update
After this, you can then install with sudo apt-get install libavif-bin