Background Image is Not Loading for Custom Page Template
Last Updated:
Overview
When using page templates, the specified background image is not used.
Applies To
- Custom Page Templates
Solution
To workaround this, use a template like this to specify the background image within the page template directly:
<!DOCTYPE html>
<html lang="{{locale}}">
<head>
{%- auth0:head -%}
<style>
body._widget-auto-layout {
--page-background-image: url('<yourImageUrlHere>');
background-image: var(--page-background-image);
background-position: center;
background-size: cover;
background-repeat: no-repeat;
}
</style>
<title>{{ prompt.screen.texts.pageTitle }}</title>
</head>
<body class="_widget-auto-layout">
{%- auth0:widget -%}
</body>
</html>