SCSS Compiling Does Not Account for Different Folder Nested Locations

I have SCSS files in a sub sub folder so when I add a background image to those the file looks like …/…/a_images/Party-Tool-Rentals.jpg (a_css/folder/mySCSSpart.scss) and this works in PG. But my files get compiled (@imported) into a SCSS file that is a_css/theme.scss and when the final theme.css gets made and exported to WordPress the path for my background image stays two folders deep which does not work.

To fix this, files that are @imported into a different SCSS folder need to have their image folder structure updated to match where they are being imported to so they properly export in WordPress.


Hi @jonroc,
This is a known SCSS issue. To get around this you need to add an asset path variable. Maybe this link will help. SASS variable for images path - GeeksforGeeks

Thanks Rob, I’ll give this a try but my guess is this will still have the issue of not being able to see the background in PG b/c the WP asset path is different from the PG asset path.