Convert image URLs in React to require
calls
This allows Webpack to insert the proper image URL after builds steps like adding a hash and so on. The path you supply to `require` is relative to the JS source file, just like any other would be.
This commit is contained in:
parent
989227d435
commit
20e296b20e
75 changed files with 201 additions and 176 deletions
|
@ -1599,7 +1599,7 @@ export default class MessageComposerInput extends React.Component {
|
|||
<img className="mx_MessageComposer_input_markdownIndicator mx_filterFlipColor"
|
||||
onMouseDown={this.onMarkdownToggleClicked}
|
||||
title={this.state.isRichTextEnabled ? _t("Markdown is disabled") : _t("Markdown is enabled")}
|
||||
src={`img/button-md-${!this.state.isRichTextEnabled}.png`} />
|
||||
src={require(`../../../../res/img/button-md-${!this.state.isRichTextEnabled}.png`)} />
|
||||
<Editor ref={this._collectEditor}
|
||||
dir="auto"
|
||||
className="mx_MessageComposer_editor"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue