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

前端 未结 5 1668
天命终不由人
天命终不由人 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 04:56

    I was having a similar problem using the iron router package, although the images were not displaying at all. My images are in the public/ directory. They would display properly if I was using the url http://localhost:3000/tracker, but my page on path http://localhost:3000/tracker/item would not load images properly and gave me the aforementioned error.

    I was using the following html:

    {{this.itemName}}
    

    When I added '/' before {{this.itemImage}} like this:

    {{this.itemName}}
    

    The image would load properly, and there would be no error.

提交回复
热议问题