Cybercriminals use images in a number of ways to infect your computer. In most cases, the photo itself is harmless; it’s just a trick to get you to do something stupid. But sometimes, a .jpg file itself will contain malicious code.