@wordpress/create-block image url in css

how to include image URL to css “style.css” in custom block?

Both these not work:

background-image: url("images/imagename.png");
background-image: url("./images/imagename.png");

Image was compiled with hash like imagename.asdasdasd.png but the path on frontend is bad (not aiming to plugin).

Gutenberg editor link (in administration – working):

http://webname.test/app/plugins/wwb-key-properties/build/images/line.d71a3edf.png

Frontend link (not working):

images/line.d71a3edf.png

Thanks for help

0

Leave a Comment