But it can’t find the image. The path is correct (frontend/themes/my-theme/images) and in the browser console I am getting a 404 error.
What am I missing?
I can not reproduce this (e.g. a theme image is loaded as background from the style). Could you please also provide the versions and the exact directory structure (e.g. I used the “new” src/main/frontend/themes/my-theme location)
I am using Vaadin 24.4.10. The directory structure is src/main/frontend/themes/my-theme. I don’t know if it helps but In the browser console I can see that the image URL results in a 404 (url-to-my-app/context-path/images/background_order.jpg in this case).
So, interestingly, it kind of fixed itself. I had the frontend folder under src/main. In another vaadin 24 project we have I saw that the frontend folder is under the project root. So I wanted to move it there to see what would happen. I misclicked, moved the frontend folder under src. The frontend build failed, so I moved the frontend folder back to src/main. And, well, it all works now. It is the exact same directory structure as before, so I don’t know why it suddenly works, but at least it works.