Open marcushellberg opened 5 years ago
I'm not sure: is this a client side only issue ? I don't see in the description any server side involvement . The whole template is written using Polymer only.
So : does it work without Flow at all?
If it works then is it so that this a web pack issue with paths: I see the image should be loaded from the path ./release-cycle.jpg
and if pure Polymer works then it looks like there is some path resolution issue?
If it doesn't work as a pure client side Polymer template then this is not a Flow issue.
The template has a corresponding server-side class extending from PolymerTemplate
and is loaded through Flow.
The issue is that everything under the frontend
folder needs to be processed by webpack to be included in the build. So this issue would happen for instance if you made a designer template and wanted to add a logo to your design. But even after modifying the webpack config to load images, they can't be used as Vaadin's navigation interferes with the download.
Could you please provide a source code so that I can use it as is to reproduce without reverse engineering the code based on description ?
Thanks for the project.
You have to use "template" route to see the template with image.
What I see is:
src
.META-INF/VAADIN/681354c5ed4a8a956b619daed64011d6.png
inside the jar file.Acceptance criteria
Hello everybody! I think I saw it late, but I'm having the same exact issue. I don't understand what's the workaround. I have my image in frontend/img/img.png I want to use it inside my customized PolymerElement class.
As a developer, I want to show an image in my template-based view.
Actions taken
Enable file-loader in webpack
npm install --save-dev file-loader
webpack.config.js
Import image and use webpack generated filename as
src
Template
Expected outcome
Image is displayed
Actual outcome
Image is not displayed. Vaadin's navigation interferes with the download request.
Environment
Vaadin 14 rc1, Chrome 75/mac