i am trying to load a image in my fiori app. The image is located in /webapp/img/greendot.jpg
like this:
But then i deploy my app to my ABAP-Repository the path changed to:
https://<server>:<port>/sap/bc/ui5_ui5/sap/my_application/~CD103454ACB782CF74F8A2339BE67CE1~5/img/greendot.png
How can i get this path so i can load my image?
Then you are loading it wrong, you should reference the SRC-property to your relative path: "/img/greendot.png" or try "./img/greendot.png"
var img = new sap.m.Image({
src : "./img/greendot.png",
});
there is no need during runtime to request any backend-paths...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With