Table of Contents
Why choose AVIF instead of JPG, PNG, WebP and GIF? : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : However, it is OK to be slightly above this limit.
Squoosh is a popular image compression web application that allows you to convert images in multiple formats to other widely used compression formats, including AVIF.
I believe you are here because you are looking for a free and fast converter. Therefore, the browser solution should be sufficient.
lovelll's avif-cli allows you to take images stored in folders (PNG, JPEG, etc.) and convert them into AVIF images of specified reduced size.
Features
sharp
Features
Conclusion
Home Web Front-end CSS Tutorial Useful Tools for Creating AVIF Images

Useful Tools for Creating AVIF Images

Mar 08, 2025 am 09:34 AM

AVIF (AV1 Image File Format) is a modern image file format specification used to store images and it can significantly reduce file size compared to other formats such as JPG, JPEG, PNG, and WebP. AVIF Specification Version 1.0.0 was finalized in February 2019 and released by the Open Media Alliance.

It saves 50% file size compared to JPG, and 20% file size compared to WebP while maintaining image quality.

This article will introduce some browser-based tools and command-line tools for creating AVIF images.

Why choose AVIF instead of JPG, PNG, WebP and GIF? : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : However, it is OK to be slightly above this limit.

    It is acceptable to lose obvious details in the image compared to the original image, unless the detail is important to the context of the image.
  • See also: Addy Osmani dives into using AVIF and WebP on Smashing Magazine.
  • Browser Solutions
  • Squoosh

Features

  1. File Size Limit: 4MB
  2. Image Optimization Settings (located to the right) Download Controls - This includes viewing the size of the result file and the percentage reduction compared to the original image
Free to use

Cloudinary

Useful Tools for Creating AVIF Images Cloudinary's free image to AVIF converter is another image tool that does not require any code. You just upload the selected image (PNG, JPG, GIF, etc.) and it will return to the compressed version. In addition to creating AVIF images, its API also has more features such as image enhancement and manual image filling.

I believe you are here because you are looking for a free and fast converter. Therefore, the browser solution should be sufficient.

Features

No description file size limit
  • Free use
  • You can find answers to the FAQ in the Cloudinary AVIF Converter FAQ.
  • Command line solution
  • avif-cli

lovelll's avif-cli allows you to take images stored in folders (PNG, JPEG, etc.) and convert them into AVIF images of specified reduced size.

The following are requirements and what you need to do:

Node.js 12.13.0

Install the package:

<code>npm install avif</code>
Copy after login

Run the command in your terminal:

<code>npx avif --input="./imgs/*" --output="./output/" --verbose</code>
Copy after login
  • ./imgs/* – Indicates the location of all image files
  • ./output/ – Indicates the location of the output folder
Features
  • Can set the conversion speed

You can learn more about the commands through the avif-cli GitHub page.

sharp

sharp is another useful tool for converting large images in common formats into smaller, more network-friendly AVIF images.

The following are the requirements and what you need to do:

  • Node.js 12.13.0

Installing the software package:

<code>npm install sharp</code>
Copy after login

Create a JavaScript file named sharp-example.js and copy this code:

const sharp = require('sharp')

const convertToAVIF = () => {
    sharp('path_to_image')
    .toFormat('avif', {palette: true})
    .toFile(__dirname + 'path_to_output_image')
}

convertToAVIF()
Copy after login

where path_to_image represents the path of the image, its name and extension, for example:

<code>./imgs/example.jpg</code>
Copy after login

and path_to_output_image means the path you want the image to be stored and its name and new extension, for example:

<code>/sharp-compressed/compressed-example.avif</code>
Copy after login

Run the command in your terminal:

<code>node sharp-example.js</code>
Copy after login

That's it! You should have a compressed AVIF file in the output location!

Features
  • Free use
  • Use sharp to rotate, blur, resize, crop, zoom images, etc.

See also: Stanley Ulili's article on how to process images in Node.js using Sharp.

Conclusion

AVIF is a technology that front-end developers should consider using in their projects. These tools allow you to convert existing JPEG and PNG images to AVIF format. However, like adopting any new tool in your workflow, it is necessary to correctly evaluate its advantages and disadvantages based on your specific use case.

I hope you enjoy reading this article as much as I do. Thank you very much for your time and wish you a great day!

The above is the detailed content of Useful Tools for Creating AVIF Images. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Stacked Cards with Sticky Positioning and a Dash of Sass Stacked Cards with Sticky Positioning and a Dash of Sass Apr 03, 2025 am 10:30 AM

The other day, I spotted this particularly lovely bit from Corey Ginnivan’s website where a collection of cards stack on top of one another as you scroll.

Google Fonts   Variable Fonts Google Fonts Variable Fonts Apr 09, 2025 am 10:42 AM

I see Google Fonts rolled out a new design (Tweet). Compared to the last big redesign, this feels much more iterative. I can barely tell the difference

How to Create an Animated Countdown Timer With HTML, CSS and JavaScript How to Create an Animated Countdown Timer With HTML, CSS and JavaScript Apr 11, 2025 am 11:29 AM

Have you ever needed a countdown timer on a project? For something like that, it might be natural to reach for a plugin, but it’s actually a lot more

Why are the purple slashed areas in the Flex layout mistakenly considered 'overflow space'? Why are the purple slashed areas in the Flex layout mistakenly considered 'overflow space'? Apr 05, 2025 pm 05:51 PM

Questions about purple slash areas in Flex layouts When using Flex layouts, you may encounter some confusing phenomena, such as in the developer tools (d...

How to select a child element with the first class name item through CSS? How to select a child element with the first class name item through CSS? Apr 05, 2025 pm 11:24 PM

When the number of elements is not fixed, how to select the first child element of the specified class name through CSS. When processing HTML structure, you often encounter different elements...

HTML Data Attributes Guide HTML Data Attributes Guide Apr 11, 2025 am 11:50 AM

Everything you ever wanted to know about data attributes in HTML, CSS, and JavaScript.

A Proof of Concept for Making Sass Faster A Proof of Concept for Making Sass Faster Apr 16, 2025 am 10:38 AM

At the start of a new project, Sass compilation happens in the blink of an eye. This feels great, especially when it’s paired with Browsersync, which reloads

See all articles