搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

Firefox 81.0.2 (and before) saving JPGs as PNGs

  • 6 回覆
  • 1 有這個問題
  • 28 次檢視
  • 最近回覆由 Bobby

more options

For some time now, Firefox has been incorrectly identifying the type for a large percentage of JPG images, and saving them with the PNG suffix instead. Graphics programs cannot open such mislabelled files, requiring me to manually find and rename such files to give them the proper .JPG suffix to match their file type.

This is far beyond a minor issue, and needs to be addressed immediately. Please. Any suggestions on how to deal with this?

被選擇的解決方法

Thanks for all the help, but I found out what the problem was. I had overlooked that I had been using an image downloader script on the different sites, and when I looked at the text of the script, I saw that it was set to save all files as PNG by default. I've corrected that, and it works fine now.

Thanks for all the help, anyway. Much Appreciated.

從原來的回覆中察看解決方案 👍 0

所有回覆 (6)

more options

Hi Bobby, that definitely should not happen. Sometimes an incorrect content-type <==> file extension association is saved in a settings file. Since it is tricky to edit, we generally suggest removing it and letting Firefox generate a new one based on your Windows registry data. Here's how:

Open your current Firefox settings (AKA Firefox profile) folder using either

  • "3-bar" menu button > "?" Help > Troubleshooting Information
  • (menu bar) Help > Troubleshooting Information
  • type or paste about:support in the address bar and press Enter

In the first table on the page, on the Profile Folder row, click the "Open Folder" button. This should launch a new window listing various files and folders in Windows Explorer.

Leaving that window open, switch back to Firefox and Exit, either:

  • "3-bar" menu button > Exit
  • (menu bar) File > Exit

Pause while Firefox finishes its cleanup, then rename handlers.json to something like handlersOLD.json.

Start Firefox back up and test again. Any improvement?

Note: This will reset PDF handling to default, so if you prefer to open those outside Firefox, see: View PDF files in Firefox or choose another viewer.

有幫助嗎?

more options

You can inspect the MIME database key with the registry editor (regedit.exe) and do a search for that MIME type (file extension) via Ctrl+F. Be cautious with editing the registry as there is NO UNDO possible: all changes are applied immediately. You can export key(s) in the registry editor before making changes. You can check specific file extension keys (e.g. .jpg) in the registry with the registry editor.

  • HKEY_CLASSES_ROOT\.jpg

You can check a possibly linked MIME type in the MIME Database registry key.

  • HKEY_CLASSES_ROOT\MIME\Database\Content Type\

有幫助嗎?

more options

@jscher2000

I'll have to get back to you once I have more image files I want to download. Thanks

@cor-el

Thanks for the suggestion. I'll wait to see if jscher2000's suggestion works first, otherwise, I'll try what you suggest. Thanks.

有幫助嗎?

more options

@jscher2000

I'm afraid that didn't solve the problem. I'm still getting some JPG files saving as PNG files. What confuses me the most is that it isn't all JPG files, nor is it from any common source, but it seems to be from over a half dozen different websites that I get that issue.

@cor-el

I checked the registry, and couldn't see anything specific that might seem to be amiss. ".jpeg" and ".jpg" entries both were set to save as JPG files, both in the "Classes" section, and in the "Mime\Database\ContentType" section, and likewise, the same with PNG files. Out of an abundance of caution, I checked all of the Image type content keys, and all of them appeared to be set to save files as the appropriate file type and suffix.

Thanks both of you for the suggestions, but they didn't address the issue. I wonder if you or anyone else has other suggestions?

有幫助嗎?

more options

Can you give a link to a sample page where JPEG files save with a PNG extension? There is a link moderation feature that delays posts which contain a URL, so you probably won't see your reply immediately. That's normal.

Also, if you haven't already, does it help to set Windows to show all file extensions? This article has the steps if needed: https://www.bleepingcomputer.com/tutorials/how-to-show-file-extensions-in-windows/

有幫助嗎?

more options

選擇的解決方法

Thanks for all the help, but I found out what the problem was. I had overlooked that I had been using an image downloader script on the different sites, and when I looked at the text of the script, I saw that it was set to save all files as PNG by default. I've corrected that, and it works fine now.

Thanks for all the help, anyway. Much Appreciated.

有幫助嗎?

問個問題

如果您還沒有帳號,您必須先 登入您的帳號 來回覆文章。請 開始一個新問題