Search code examples
imageheadersapui5

Header image on SAPUI5 application


I am just trying to add the image on index.html. I have create a folder of images under webcontent and add the image in images folder. I am calling it in the following way:

<HBox >
<Image
                                        src="{./images/abc1.jpg}"
                                        width="100%"
                                        height="100%"/>
</HBox>

But it is showing nothing on browser. Please advice.


Solution

  • You use curly brackets when you are trying to bind data from a model. Since you are not using a model to bind data. You can remove it and try. Code for the same is as mentioned here:-

    <HBox>
       <Image src="./images/abc1.jpg" width="100%" height="100%"/>
    </HBox>