Vaadin Flow - Images shown in jetty but not when deployed on tomcat8

I created a folder for my images and use this object to create an image:
Image image = new Image("frontend/foo/dummy.png", "Dummy");
When I debug the image is shown. When I deploy the application with mvn package and copy the war to tomcat8 nothing is shown.

Do I need to create a web.xml?

I too faced with a similar issue with tomcat8 but worked fine with tomcat9.

What does the vaadin team recommend?

I haven’t come across any tomcat version specific issue discussed so far.

Hi guys, I tried with this and it works!:
Image image = new Image(“…/…/frontend/foo/dummy.png”, “Dummy”);

Hi Syam,

Not sure if you are spam:
“I too faced with a similar issue with tomcat8 but worked fine with tomcat9.”
“I haven’t come across any tomcat version specific issue discussed so far.”

Your posts are a contradiction.

Hi Julio,

I was able to fix the problem. The path was “frontend/foo/dummy.png”. The reason why it didn’t worked was outside of vaadin. If I opened the image directly with the url on firefox I received an error message. After some research I saw, that every image contains a git lfs url because my ci/cd wasn’t setup properly :slight_smile:

So the conclusion: I should have checked the image with the direct url. Every image was some bytes in size.