add .avif

This commit is contained in:
Dym Sohin 2023-08-27 01:45:07 +02:00
parent d569a879cd
commit 41ca3f1fb5
2 changed files with 5 additions and 1 deletions

View File

@ -36,6 +36,8 @@ to only print a report:
- [`file`](https://darwinsys.com/file/) - to determine file type - [`file`](https://darwinsys.com/file/) - to determine file type
- [`sd`](https://github.com/chmln/sd) better sed - [`sd`](https://github.com/chmln/sd) better sed
- [`jpegoptim`](https://github.com/tjko/jpegoptim) to compress JPEGs - [`jpegoptim`](https://github.com/tjko/jpegoptim) to compress JPEGs
- [`imagemagick`](https://imagemagick.org/)
or [`graphicsmagic`](http://www.graphicsmagick.org/) to mogrify PNGs
- [`pngcrush`](https://github.com/Kjuly/pngcrush) to compress PNGs - [`pngcrush`](https://github.com/Kjuly/pngcrush) to compress PNGs
<!-- - [`pngquant`](https://github.com/kornelski/pngquant) to compress PNGs --> <!-- - [`pngquant`](https://github.com/kornelski/pngquant) to compress PNGs -->

View File

@ -17,6 +17,7 @@
# - file - to determine file type # - file - to determine file type
# - `cargo install sd` better sed # - `cargo install sd` better sed
# - jpegoptim to compress JPEGs # - jpegoptim to compress JPEGs
# - imagemagick or graphicsmagic to mogrify PNGs
# - pngcrush to compress PNGs (losless) # - pngcrush to compress PNGs (losless)
# // - pngquant to compress PNGs (lossy) # // - pngquant to compress PNGs (lossy)
@ -25,7 +26,7 @@ ALL_EXTS=`echo \
|eps|tga|tiff?|psd|ico|xcf|heic |eps|tga|tiff?|psd|ico|xcf|heic
|eot|otf|ttf|epub|doc|docx|xls|swf|pdf|odt |eot|otf|ttf|epub|doc|docx|xls|swf|pdf|odt
|flac|opus|ogg|m4a|wav |flac|opus|ogg|m4a|wav
|mpe?g|mp\d|mov|mkv|avif?|asf|3gpp? |mpe?g|mp\d|mov|mkv|avif?|asf|3gpp?|av1
|html?|sh|py|php |html?|sh|py|php
' \ ' \
| tr -d '[:space:]' \ | tr -d '[:space:]' \
@ -232,6 +233,7 @@ for FILENAME in "$@"; do
'image/jp2') rename_ext "$FILENAME" 'jp2' ;; 'image/jp2') rename_ext "$FILENAME" 'jp2' ;;
'image/png') rename_ext "$FILENAME" 'png' ;; 'image/png') rename_ext "$FILENAME" 'png' ;;
'image/webp') rename_ext "$FILENAME" 'webp' ;; 'image/webp') rename_ext "$FILENAME" 'webp' ;;
'image/avif') rename_ext "$FILENAME" 'avif' ;;
# vector-based # vector-based
'image/svg+xml') rename_ext "$FILENAME" 'svg' ;; 'image/svg+xml') rename_ext "$FILENAME" 'svg' ;;