You need to sign in to do that
Don't have an account?

Boat images not loading up in LWC specialist superbadge
Hi all,
I am working on the LWC Specialist Superbadge Challenges. For my component BoatTile, the Boat pictures are supposed to load up on the page. See screenshot below-

This is the piece of code for that-
get backgroundStyle() {
return "background-image:url(${this.boat.Picture__c})";}
Please have a look! Thanks!
I am working on the LWC Specialist Superbadge Challenges. For my component BoatTile, the Boat pictures are supposed to load up on the page. See screenshot below-
This is the piece of code for that-
get backgroundStyle() {
return "background-image:url(${this.boat.Picture__c})";}
Please have a look! Thanks!
https://trailhead.salesforce.com/help?support=home#
https://trailhead.salesforce.com/help
So that our trailhead support engineers will look into it and get back to you.
I hope you find the above information is helpful. If it does, please mark as Best Answer to help others too.
Regards,
Salesforce Support.
Try the below return in backgroundStyle() instaed:
get backgroundStyle() {
return `background-image:url(${this.boat.Picture__c})`;
}
Thanks @Liron Cohen, I was facing the same issue and spent a lot of time trying to resolve this but finally below is working for me:
get backgroundStyle()
{
return "background-image:url('" + this.boat.Picture__c + "')";
}
get backgroundStyle() {
return `background-image:url("${this.boat.Picture__c}")`;
}