generator-jhipster: Images referred in HTML templates are not found

Overview of the issue

I generated a project using jH 4.0.3 version. I copied all my actual navbar content into navbar.html. The logo in navbar.html is referring to ../../../content/images/my_logo.png

All the images in default project are referred in css files and not from HTML files. I can’t figure how to get this working with images referred directly from HTML. When I start the application, the image is not found. Also, I checked in www folder under build. There is no generated hash file name for my_logo.png.

Motivation for or Use Case

Component HTML must be able to refer to images in .../content/images/... directly without involving CSS

Reproduce the error

Add a new image in /content/images folder and refer to that image directly using <img src>

JHipster Version(s)

4.0.3

Other

node: v7.5.0 npm: 4.2.0 bower: 1.8.0 gulp: 3.9.1 yarn: 0.19.1

  • Checking this box is mandatory (this is just to show you read everything)

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (15 by maintainers)

Commits related to this issue

Most upvoted comments

I stupidly did not put html-loader in package.json assuming webpack knows how to pick it. That fixed the issue for me.