The property you need to manipulate for changing the background image of the whole page is document.body.style.backgroundImage: document.body.style.backgroundImage = "url ('image.png')"; One bad thing is , anyone can view my html source. A background image can be specified for almost any HTML element. { The following setImage JS function accepts the tag id and data stream for the image. HTML5 Canvas Load Image Data URL (html5canvastutorials.com). We use cookies to give you a great online experience. thank you bruce for more clear understanding. }, img.SaveAsPng(outStream); Blazorise is not stopping you from using regular html or css. PhysicalFileProvider is used to access the physical path. tells the browser (which is fetching the image), that the path is relative to the url of the page hosting the above html. Image64 = "data:image/png;base64," + Convert.ToBase64String(outStream.ToArray()); Login Page background image Radzen IDE (Blazor server-side) Thomas January 27, 2022, 4:37pm #1 Hello all & Radzen team, I must show a background image only on the login page. I tried adding the background image in site.css, it still remains unchanged. end up doing is wrapping the razor page in a div and give it whatever class or id name you have setup to display the background image on only that page. The result from the snippet below. The Ultimate Guide to Blazor Forms and Validation, Static Image in Blazor Inside and Outside Web Root. To serve this, you first need to configure the UseStaticFiles () method in the Startup.cs file. The content you requested has been removed. More info about Internet Explorer and Microsoft Edge, ASP.NET Core Blazor JavaScript interoperability (JS interop), Make HTTP requests using IHttpClientFactory in ASP.NET Core, Call .NET methods from JavaScript functions in ASP.NET Core Blazor, Call JavaScript functions from .NET methods in ASP.NET Core Blazor. Define Background Position, Background Repeat, Background Size, Height and Width of tag. 100% 100%: Try resizing the browser window, and you will see that the image will stretch, but always cover the entire element. Creates a Blob to wrap the ArrayBuffer. Here the image is obtained from {applicationFolder} /wwwroot/Image/InsideWebRoot.png. Go to Blazor r/Blazor by . Not the answer you're looking for? Browse other questions tagged, Where developers & technologists share private knowledge with coworkers, Reach developers & technologists worldwide, thank you very much man for the help, I was very thanked, Okay if you can mark the answer as the correct one by checking the tick I would be most grateful, How Intuit democratizes AI development across teams through reusability. You'll need Blazor.Extensions.Canvas as well as SixLabors.ImageSharp libraries. images are working but crousal slider images are not working. By continuing to use this website, you are agreeing to our updated Techcedence Cookie Policy. Get certifiedby completinga course today! How can this new ban on drag possibly be considered constitutional? section: Specify the background image in the