The P in JPEG stands for photographic so I guess we shall pronounce it “jayfeg” based on that logic.
/s
Descriptive linguistic opinion: both the hard and soft G pronunciations are used, with the hard G being more common, but I like the soft G and use it myself.
The only argument is that the guy who invented and named the GIF originally pronounced it that way, but he was a computer scientist, not a linguist. Thankfully the inevitable and uncontrollable evolution of language corrected that mistake fairly quickly.
Because at the origin of the format, “choosy graphic designers choose .GIF”. Which is a direct reference to JIF, the brand of peanut butter, and their tagline.
The pronunciation of an acronym often has little to nothing to do with the words themselves they represent, and more to do with the acronym itself as though it were a word.
Reverse that.
.jif (jpeg interchange format) came out 5 years after .gif.
It was an homage to GIF.