Issue #4071💬 AnsweredOpened January 14, 2022by clonefunnels0 reactions

On page background images don't work because CSS loads with no ; at the end of URL

Quick answerby clonefunnels

I think I caused this problem with a string replace. Sorry

Read full answer below ↓

Question

GrapesJS version

  • I confirm to use the latest version of GrapesJS

What browser are you using?

Chrome and Firefox

Code SnippetTEXT
### Reproducible demo link

https://www.teamfunnels.net/login.php demo demo

### Describe the bug

Missing required ; after .png)
The editor loads this way when there are background images on the page and they don't display.
<style>
 #i7u3f{
    background-image:url(https://www.teamfunnels.net/assets/202201141203/img/hero-bg.png) background-position:top center;
    background-size:cover;
  }
  #i6o6l{
    background-image:url(https://www.teamfunnels.net/assets/202201141203/img/bg-departments.png) background-position:top center;
    background-size:contain;
  }
  #ifttij{
    background-image:url(https://www.teamfunnels.net/assets/202201141203/img/bg-eye-care.png) background-position:center;
    background-size:contain;
  }
  #i6k5vw{
    background-image:url(https://www.teamfunnels.net/assets/202201141203/img/about-us.png) background-position:top center;
    background-size:contain;
  }
  #i6typr{
    background-image:url(https://www.teamfunnels.net/assets/202201141203/img/about-bg.png) background-position:top center;
    background-size:contain;
  }
  #i9qpbl{
    background-image:url(https://www.teamfunnels.net/assets/202201141203/img/doctors-us.png) background-position:top center;
    background-size:contain;
  }
  #injrir{
    background-image:url(https://www.teamfunnels.net/assets/202201141203/img/doctors-bg.png) background-position:top center;
    background-size:contain;
  }
  #icnre6{
    background-image:url(https://www.teamfunnels.net/assets/202201141203/img/people.png) background-position:top center;
    background-size:contain;
  }
  #iywt0f{
    background-image:url(https://www.teamfunnels.net/assets/202201141203/img/people-bg-1.png) background-position:center;
    background-size:cover;
  }
  #igpf6a{
    background-image:url(https://www.teamfunnels.net/assets/202201141203/img/people.png) background-position:top center;
    background-size:contain;
  }
  #i5w8nh{
    background-image:url(https://www.teamfunnels.net/assets/202201141203/img/dot-bg.png) background-position:bottom right;
    background-size:auto;
  }
  #validationTextarea{
    height:250px;
  }
  #ieo7xa{
    background-image:url(https://www.teamfunnels.net/assets/202201141203/img/blog-post.png) background-position:top center;
    background-size:contain;
  }
  #is3qsh{
    background-image:url(https://www.teamfunnels.net/assets/202201141203/img/dot-bg.png) background-position:top left;
    background-size:auto;
  }
  #irarp9{
    background-image:url(https://www.teamfunnels.net/assets/202201141203/img/cta-bg.png) background-position:center right;
    margin-top:-8.125rem;
    background-size:contain;
  }
  #i81ozm{
    background-image:url(https://www.teamfunnels.net/assets/202201141203/img/dot-bg.png) background-position:top left;
    margin-top:-3.125rem;
    background-size:auto;
  }
</style>


### Code of Conduct

- [X] I agree to follow this project's Code of Conduct

Answers (2)

clonefunnelsJanuary 14, 2022

I think I caused this problem with a string replace. Sorry

ClaudeCodeMay 17, 2026

Thanks for reporting this, @clonefunnels.

The issue with On page background images don't work because CSS loads with no ; at the end of URL appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modifications overlap, creating an inconsistent state.

What to try:

  1. Add a setTimeout wrapper to ensure the DOM has settled:
setTimeout(() => {
  // your operation here
}, 0);
  1. Check initialization order — make sure components are fully loaded before you interact with them

  2. Use the editor's event system — listen to completion events:

editor.on('component:mount', (component) => {
  // safe to interact with component here
});

Recommended next steps:

  • Test with the latest GrapesJS version if you haven't
  • Provide a minimal reproducible example (CodeSandbox) — this helps the team identify the root cause faster
  • Include GrapesJS version, browser, and console errors in your report

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.