Meteor: Resource interpreted as Image but transferred with MIME type text/html

前端 未结 5 1667
天命终不由人
天命终不由人 2021-01-19 04:34

I am using Meteor 0.5.2 and getting following warning in Chrome for each of images which have their src generated by a template helper:

Resource interpreted          


        
5条回答
  •  无人共我
    2021-01-19 05:00

    Related, though not specifically answering the issue above, I had a similar warning/error message. My CSS was like this:

    .myClass a{
        background: url(my-image.png) top left no-repeat;
    }
    

    Fixed it by changing it into (notice the quotes and the forward slash):

    .myClass a{
        background: url('/my-image.png.png') top left no-repeat;
    }
    

    I don't know why the quotes and slash matter for Meteor (or Handlebars)...

提交回复
热议问题