I am currently working on an Angular app using Yeoman and overall, I find the experience quite enjoyable. However, there is one issue that has been bothering me.
Whenever I build and deploy my project with grunt serve:dist
, all the images I have used end up broken. This happens because Yeoman changes the filenames of each image, but neglects to update the HTML links. Surprisingly, it does update the corresponding CSS files.
For example, if I have an image named default_picture
in my HTML like this:
<img src="../images/default_picture.jpg" alt="#">
After building the project, Yeoman changes the file name of the image from default_picture
to something like default_picture.cbed2a58.jpg
, without updating the src
attribute in the img
tag. As a result, the images no longer point to valid files in the directory structure.
I have searched through the Yeoman project on Github extensively, but haven't found a solution to this issue.
Is there a way for me to resolve this problem by either properly updating the HTML or preventing Yeoman from changing my image file names?