In SharePoint 2019 on premise , IRM only supports protect PDF files but not JPEG files.
To use PDF files in libraries that the owner has protected with IRM, the user will need to obtain one of the following PDF-compatible readers:
SharePoint-Compatible PDF readers that support Microsoft Information Rights Management services