Resource interpreted as image but transferred with MIME type text/html - Magento

前端 未结 15 2249
孤城傲影
孤城傲影 2020-12-05 06:48

I\'m getting below error when uploading a new product image for my Magento shop.

Resource interpreted as image but transferred with MIME type text/html
         


        
15条回答
  •  無奈伤痛
    2020-12-05 07:10

    After a lot of research, I have found the problem is caused by a combination of things resulting in the server not knowing what type of document it is and getting mixed up between encoding types such as UTF-8 (or something like that)

    So, in .htaccess, change the comments round so you have the following, giving a default character set of UTF-8.

    ############################################
    ## Prevent character encoding issues from server overrides
    ## If you still have problems, use the second line instead
    
        #AddDefaultCharset Off
        AddDefaultCharset UTF-8
    

    This stopped the correct error shown in google (thank you mr google): "resource interpreted as image but transferred with mime type text/html"

    And the made the images show up in other browsers (where there was no error shown).

提交回复
热议问题