While JPG is an image format and PFX (PKCS#12) is a digital security container, the "conversion" usually refers to extracting text-based certificate data from an image or using an image as a visual element within a digital signature process.
If it asks for a password and prints certificate information, it works. If it prints "bad magic number," it is still a JPG. Jpg To Pfx Converter Online - Free
If your JPG contains a QR code that encodes a certificate URL or PKCS#12 data, you can: Yes, converting a JPG to a PFX file