Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8511009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:52:04+00:00 2026-06-11T03:52:04+00:00

I opened a image/x-png type image in new tab, but Chrome just downloaded it.

  • 0

I opened a image/x-png type image in new tab, but Chrome just downloaded it.
I googled it and found that Chrome doesn’t interpret image/x-png as image file.

So, I want to edit my Chrome’s MIME type mappings. Is it possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T03:52:05+00:00Added an answer on June 11, 2026 at 3:52 am

    Too bad you have not answered my comment, so I forgot about your question and lost the bounty. I guess my answer is even a little easier to use for you because you do not need to click any context menus in order to see the PNGs directly in the browser:

    Chrome extension Redirector can be configured to replace HTTP response headers. I created a rule replacing the Content-Type header for any URL ending with “.png”:

    Paste this JSON code into a text editor, save as png_rule.json and then in Redirector settings go to Rules Manager, click Files to open im-/export options and import the rule version 1:

    [{"name":"x-png -> png","match":{"str":"\\.png$","type":0,"modi":false},"sub":{"str":"Content-Type","type":4,"modi":true,"modg":true},"repl":{"str":"image/png","decode":false},"enabled":1}]
    

    From now on all your PNG files should be fine.

    Update: replaced the simple pattern match by a stricter regex match as suggested by the author or Redirector.


    Update 2: There are systems like Trac which produce URLs for PNG attachments ending in “.png”, but really being HTML pages which only embed the PNG as part of the page. In this case we need to blacklist the hosts because otherwise the HTML page’s content type would be set to image/png even though it should remain text/html. Because of Redirector‘s limitation that headers can just be overwritten for matched URLs and partial replacement, e.g. only png instead of x-png, is impossible, we need to use a rather ugly approach of explicitly excluding certain hosts in the regex match. E.g.

    ^https?://(?!([^/]+\.)?(?:trac\.edgewall\.org|freetz\.org)/).*\.png$
    

    would exclude URLs containing either host name trac.edgewall.org or freetz.org. The full JSON to be imported into Redirector is rule version 2:

    [{"name":"x-png -> png","match":{"str":"^https?://(?!([^/]+\\.)?(?:trac\\.edgewall\\.org|freetz\\.org)/).*\\.png$","type":0,"modi":true},"sub":{"str":"Content-Type","type":4,"modi":true,"modg":true},"repl":{"str":"image/png","decode":false},"enabled":1}]
    

    Two test URLs failing (i.e. showing empty “images” instead of HTML pages) with the previous version of the rule without blacklisting and now functioning with the new rule including blacklisting are:

    • http://trac.edgewall.org/attachment/ticket/10804/changeset_show_files_3.png
    • http://freetz.org/attachment/ticket/1908/arris1.png

    It is easy to add other URLs if you know a little regex or just play around.

    By the way: For Trac URLs a good alternative would be to use the common part “/attachment/ticket/” for blacklisting. This way you could blacklist all Trac installations worldwide instead of a fixed hosts list. So this is rule version 3:

    [{"name":"x-png -> png","match":{"str":"^https?://(?!([^/]+)?/attachment/ticket/).*\\.png$","type":0,"modi":true},"sub":{"str":"Content-Type","type":4,"modi":true,"modg":true},"repl":{"str":"image/png","decode":false},"enabled":1}]
    

    Update 3: Redirector is no longer available in Chrome store, but historic versions can be downloaded from the old Redirector home page.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a transparent png image foo.png and I've opened another image with: im
i need to get the current image opened after importing an image sequence to
I Opened/Created a new Word document dynamically on FormLoad using: using Word = Microsoft.Office.Interop.Word;
I opened a files in vim using gf command.which opened a file that the
I just opened some old code in the current Eclipe Juno Release Candidate and
If I place (insert-image (create-image /tmp/test.png)) in a buffer, place the cursor after the
So I have a .jpg/.png and I opened it up in Text Edit which
I am trying to attach an image that is picked from the image gallery
I have an ActionResult at http://example/image.png Is there a way to determine if the
I am trying to access an image that is passed into an event handler

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.