Scroll down to get a detailed answer
Resetting the Photos app, running the System File Checker tool, or restoring your system to a previous state are recommended fixes.
Why Do You Encounter โInvalid Value for Registryโ Errors?
In the heart of your computerโs operating system, the registry serves as a comprehensive database, storing low-level settings for the OS and for the apps that opt to use it. Itโs essentially the DNA of your Windows machine.
Unfortunately, this makes it susceptible to corruption or misconfiguration, which can result in errors like โInvalid value for registry on JPG/JPEG/PNG files.โ
Fixing the Issue: Methods to Try
The first line of defense when you encounter this error should be resetting the Photos app. Windows 10 (and later) uses the Photos app as its default photo viewer. Corruption within this app can lead to errors, but resetting it often solves the problem.
- Go to Settings > Apps.
- Scroll down and click Photos > Advanced options.
- Click Reset.
Note:
All app data will be deleted, but this will not affect your photos.- Press Windows + X and select Command Prompt (Admin).
- Type
sfc /scannow
and press Enter. - Let the scan complete and follow any prompts to repair files.
In some cases, a recent system change could be the culprit. Restoring your system to a previous state might be the solution.
- Type System Restore in the Windows search box and select Create a Restore Point.
- Click System Restore in the new window.
- Follow the prompts to select a restore point from before the issue started and complete the process.
Understanding the Registry and its Role in the Error
To fully comprehend the essence of the error โInvalid value for registry on JPG/JPEG/PNG filesโ, itโs crucial to know more about what a registry is. In a Windows computer, the registry serves as the keeper of all configuration settings for both your operating system and installed applications.
With such a monumental responsibility, it is, unfortunately, susceptible to errors and issues, particularly when changes or updates are applied, potentially resulting in a corrupted registry. A corrupted registry key corresponding to the Photos application can cause the specific error weโre discussing.
Repairing the Registry
Though it might seem intimidating, manual editing of the Windows registry is another method to consider if the error persists after trying the other solutions.
I recommend creating a backup of your registry before making any changes to avoid accidentally creating new problems.
- Press Windows + R and type
regedit
, then press Enter to open the Registry Editor. - Navigate to
HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\Repository\Families\Microsoft.Windows.Photos_...
. - You will find several entries, usually eight. Delete the oldest entries until only the newest four remain.
Note:
Care should be taken when editing the registry. Incorrect changes can severely affect your systemโs operation.Reinstalling the Photos App
If youโre not comfortable editing the registry, another option to consider is reinstalling the Photos app. This can be a bit tricky, as the Photos app is a built-in Windows application, but it can be done using PowerShell.
- Right-click on the Start button and select Windows PowerShell (Admin).
- Type the command
Get-AppxPackage *Microsoft.Windows.Photos* | Remove-AppxPackage
and press Enter. This command removes the Photos app. - Restart your computer.
- To reinstall the Photos app, open the Microsoft Store, search for Microsoft Photos, and click Install.
Alternate Photo Viewing Software
If all else fails, or if you simply want a change, you might consider using a different photo viewer. There are many alternatives available that are both free and easy to use.
For example, I recommend software such as IrfanView, which is lightweight and user-friendly, or Adobe Lightroom, a more advanced tool that is excellent for professional use. These alternative photo viewers can bypass the registry issues that are causing problems with the default Windows Photos app.
Additional Tips and Alternatives
If these steps fail to resolve the error, I recommend trying an alternative photo viewing software, such as IrfanView or Adobe Lightroom, to bypass potential problems within Windowsโ default viewer.
Maintaining regular backups of your registry can also be beneficial. Registry backups allow you to restore your system to a functioning state, even in the face of serious errors.
Conclusion
Errors like โInvalid value for registry on JPG/JPEG/PNG filesโ can appear complex, but understanding the role of the registry helps demystify the issue. With careful application of a few key methodsโresetting the Photos app, using the SFC tool, or restoring your systemโyou can overcome this error.
FAQs
Why does this error only affect my photos?
The error is specific to the Photos app, the default photo viewer in Windows. If the appโs registry keys are corrupted, youโll likely experience this error when opening image files.
Will resetting the Photos app delete my images?
No. Resetting the Photos app will clear the appโs data, but it wonโt delete any of your photos.
Can I prevent this error from happening in the future?
Regular system maintenance, including regular backups and updates, can help prevent registry errors. However, since the root cause often involves system-level corruption, itโs impossible to completely eliminate the risk.