I can’t seem to render any image to my react app that is stored locally. Whether it’s using import or require, I was getting this compile error where it tells me to reference Webpack. I created the app using the Shopify CLI so I did my best of writing to the correct file. I added an additional .push with ‘file-loader’ as shown below in the next.config.js.
This got rid of the compile error:
I’ve tried both import and require for the image rendering but I still get the Alt text instead of the image.
I feel like the CLI setup should already be configured to compile images as it is. Am I missing something? Any help would be greatly appreciated.


