Issue #2849Opened June 21, 2020by meyerco1 reactions

[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)

meyercoAugust 26, 20201 reactions

Hi @artf , #2975 Here is a PR to fix the issue . Please update me if its good enough .

Thanks

artfJuly 1, 20200 reactions

Thanks for the report, I'd appreciate a PR for this issue

meyercoJuly 1, 20200 reactions

Can you direct me to a file , where background-image is set ?

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...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.