Hi, in vaadin 8 i put the images in src/main/resources/VAADIN folder, the images are loaded by a javascript component, so they have to be accessible from a path like ./myassets/image.png
is it the same in vaadin 14 ? seems not.
Thanks
Hi, in vaadin 8 i put the images in src/main/resources/VAADIN folder, the images are loaded by a javascript component, so they have to be accessible from a path like ./myassets/image.png
is it the same in vaadin 14 ? seems not.
Thanks
See [this helpful overview]
(https://stackoverflow.com/a/57553974/3441504) for static file destinations.
with the image example (flower.jpg) in that post, you should be able to access the image from javascript with the path img/flower.jpg
even if the js is in the frontend folder and the image is not. Your IDE will complain that it cannot resolve the file but you can ignore that.
Dropping some links here to find the right documentation. Especially the “[Resource Cheat Sheet]
(https://vaadin.com/docs/v14/flow/importing-dependencies/tutorial-ways-of-importing/#resource-cheat-sheet)” is handy.
While the forum is closed you can ask/comment more on the documentation pages.