I am developing a new theme locally with SCA 2022....
# suitecommerce
c
I am developing a new theme locally with SCA 2022.1. Trying to use SVG images as a background image.
background-image: url(getExtensionAssetsPath('img/example.svg'))
. The theme has been deployed and activated. Therefore, the SVG images are in the file cabinet and locally in the assets/img folder. However, when running locally, SVG images as a background image do not display. Is this a limitation with SCA or a bug?
Example scss markup that does not render when developing locally.
Copy code
&:before {
		content: '';
		background-image: url(getThemeAssetsPath('img/us-icon.svg'));
		background-size: contain;
		width: 20px;
		height: 14px;
		display: inline-block;
	}
Anyone?
b
When you say it is locally in the assets/img folder are you talking about in the actual LocalDistribution folder? Or just within the Theme/assets folder. Is there an error in the console for can't find the image path?
c
The .svg images are located in the LocalDistribution tmp folder, similar to the other .png files, which do display when used as a background image.
b
I think try using this one:
getThemeAssetsPathWithDefault('img/us-icon.sgv')
Actually, never mind I see the getThemeAssetsPath uses that one anyway
c
IMO total head-scratcher