0

the path to the image is correct, but it is not inserted correctly into the html

{backgroundImage: `url('${getContentPath()}${PATH_SEP}${pdf.cover}')`}enter image description here

Alex Lee
  • 61
  • 2

1 Answers1

0

Don't use absolute paths. Or put the image in the public folder and refer by URL. And don't use cyrillic for folder's name! (https://www.freecodecamp.org/news/react-background-image-tutorial-how-to-set-backgroundimage-with-inline-css-style/)

Victor Mog
  • 25
  • 5