I am using this:
file="your_image.jpg"; output="${file%.*}.jxl"; cjxl "$file" "$output" --lossless_jpeg=1 -e 7 || cjxl "$file" "$output" --lossless_jpeg=0 -q 90 -e 7 && touch -r "$file" "$output" && rm "$file" && echo "Converted: $file -> $output"
To convert files, but the dimension metadata gets stripped. What am I doing wrong?
the metadata is there
~/2025/12 14:17:09
exiftool your_image.jxl
ExifTool Version Number : 13.36
File Name : your_image.jxl
Directory : .
File Size : 381 kB
File Modification Date/Time : 2025:12:04 14:16:49+01:00
File Access Date/Time : 2025:12:04 14:17:10+01:00
File Inode Change Date/Time : 2025:12:04 14:17:09+01:00
File Permissions : -rw-r--r--
File Type : JXL
File Type Extension : jxl
MIME Type : image/jxl
Major Brand : JPEG XL Image (.JXL)
Minor Version : 0.0.0
Compatible Brands : jxl
Image Width : 1535
Image Height : 2048
Image Size : 1535x2048
Megapixels : 3.1
~/2025/12 14:18:40
But Dolphin doesn't show it anymore.
Doesn't happen with all the pictures though.