cancel
Showing results for 
Search instead for 
Did you mean: 

Child theme and image inheritance

Child theme and image inheritance

We have created our own custom theme (let's call it Theme A), the parent of which is Luma.

All is perfect.

We've created a child theme of our custom Theme A because we need to use the same design for four different brands, changing colors and a few minor graphic changes.

 

We've followed the method as described on the Magento Developer Docs site, where we have created an empty _extend_child.less file in our Theme A, and included it at the end using @import. Then created the _extend-child.less file in our Theme B. For the CSS tweaks this all works fine.

 

Our problem is, that all references to our Theme B images folder are ignored. For example, we've created new icons that are declared via CSS, but they aren't found because it seems they are being looked for in the Theme A /web/images folder and not our Theme B folder.

 

Same for the logo, we've placed the Theme logo in the /web/images folder (we've done it this way because we need it to be an svg so can't be uploaded via admin) but it's ignoring the new logo.svg in Theme B and it's displaying the logo in Theme A.

 

How do we override the images from the parent theme?