Picture of Sebastiaan Schoute
Background image in custom component not showing
by Sebastiaan Schoute - Wednesday, 2 December 2020, 12:00 AM

Hi all,

I've been working on a custom component which uses an svg-image as backgroundimage through css/less. It is stored inside the components source folder in a separate assets folder. During development using the framework it shows up nicely, but when upload it to an AAT and test run it, the background image does not show up. It actually does not appear in the preview source. It does get uploaded inside the plugin folder though.

I force rebuild it but no luck.

What am I missing here?


Picture of Barry Jenkin
Re: Background image in custom component not showing
by Barry Jenkin - Saturday, 12 December 2020, 12:29 AM

What's your background-image url when you inspect the preview? I've attempted this before in css where I've had to change the relative url to start with ../../ to get it working in preview (although not using svg).