[BUG] Using image url for background-image is not working properly
Question
Description
- On our project for images assets we use url instead of base64 code .
Expected behavior
- When setting a background-image to a control , it has to update the css of this control .
- The css have to be reflected on the canvas and the style panel .
What happens instead ?
- If the image have spaces or parentheses on its name , when setting it as background-image it is not reflected anywhere , not on the canvas and not on the style-panel .
The conclusions of my research
Trying to understand this bug i notified that if the image have spaces or parentheses on its name , it breaks background-image value .
For example if the image is named "my image.jpg": The css will break on the space as bellow :
background-image : url(http://localhost:3000/images/my image.jpg)
I think that the solution is simply to add quotes around url or base64 code , it will not break the current functionality ,
Answers (3)
Hi @artf , #2975 Here is a PR to fix the issue . Please update me if its good enough .
Thanks
Thanks for the report, I'd appreciate a PR for this issue
Can you direct me to a file , where background-image is set ?
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2586
[Question]: How update style manager panel using few devices and custom css class
There is a custom class added to simple grapesjs project: If there is no devices and user adds the class into the selectors field Settings...
Issue #2774
mediaCondition: "min-width" breakpoints not applying the correct style in canvas
Hi, I'm having some issue with mobile first approach. The canvas render the wrong style when setting different styles at multiple breakpoin...
Issue #1506
Css Media Query Issue
Hello @artf There is an issue on demo page as well as library in media query. Issue is that if user update style on mobile view first and t...
Issue #1816
Not allowing to upload same image on same the position after delete that image
Ajax call which is uploading image file in assests folder It's working fine to add an image from the local. But in another scenario, It's n...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.