With macOS 10.13 and iOS 11 Apple has introduced new file format for images called HEIF (High Efficiency Image File Format). Files has the same quality as old JPG but they are much smaller.
This converter app allows you to open JPG/JPEG/PNG and some RAW (NEF and CR2) files on Mac and save them in HEIF (files are with .HEIC extension).
It's free and open source. Feel free to fork and contribute: https://github.com/makoni/jpg-to-heif-converter