Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The HTMLImageElement provided is in the 'broken' state [duplicate]

Tags:

html

image

meteor

I'm making a simple chat app with meteor. My HTML is:

<body>
    <h1 align="center">tomomi-chat</h1>
    <img src="original.gif">
    <div class="container" align="center">
    {{>entryfield}}
    </div>
    <br>
    <div class="container">
    {{>messages}}
    </div>  

The image won't load on the local server. As the app is extremely simplistic, there are no folders besides the '.meteor' folder in the directory. The .js, .css, and .html files are all in the app directory.

Even if I host the image and use an external link, the result in the same. Why is meteor blocking images from my app?

deployed: http://tomomi.meteor.com/

like image 369
user3697034 Avatar asked Nov 21 '22 03:11

user3697034


1 Answers

You should create a folder named public in your application root folder.

From the Meteor documentation:

/public

Files in /public are served to the client as-is. Use this to store assets such as images. For example, if you have an image located at /public/background.png, you can include it in your HTML with or in your CSS with background-image: url(/background.png). Note that /public is not part of the image URL.

like image 165
Werner Kvalem Vesterås Avatar answered Nov 26 '22 23:11

Werner Kvalem Vesterås