HeicConvert is a script which, when installed, will create an icon on your Linux desktop.
Dragging and dropping any jpg or png image on the HeicConvert icon will create a heic format copy of the image in the same location as the original image. For example the file DSC02422.JPG dropped on the icon will result in the creation of another file DSC02422.heic. Exif information of the jpg file will be copied to the generated heic file.
Heic images are at least one-third in size as compared to the jpg format images.
You can even drag and drop a whole folder on the icon, and all the images in it will be converted to heic.
sudo apt install libheif-examples
sudo apt install libimage-exiftool-perl