PHome page of pwa

I have installed PWA venia in frontend magento 2.3 but images are not loading.

  • we need more information. is the image not loaded by your browser because of a 404? – Philipp Sander Feb 28 '19 at 10:42
  • @ Philipp Sander : Yes getting 404 error – srg Feb 28 '19 at 11:08
  • does the file exist? – Philipp Sander Feb 28 '19 at 11:47
  • Yes the file is there.. – srg Feb 28 '19 at 11:51
  • I have a small doubt do we need to set the media path? – srg Feb 28 '19 at 11:52

I faced the same problem and was able to resolve it by creating Virtual Host (the reason why it is necessary, is to resolve the CORS erros).

You can view CORS errors when opening the 404 image in a new tab, you will get erros in console.

Create virtual host by following all steps mentioned here. Point Virtual Host to pub directory of Magento instance.

Give that VH URL in env file as well. This link may be very help full as well.

| improve this answer | |

Create a virtual host and point it to the pub directory instead of the root directory.

| improve this answer | |

First create a virtual host for your magento root directory. If you are dont know how to setup virtual host please follow the link : https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts

Next you need to edit the file named "makeMediaPath.js" which is placed in the path


Now change the following line

const mediaPath = 'http://magento23.com/pub/media/catalog';

In the above line please replace "magento23.com" with your virtual host

| improve this answer | |
  • Thanks a lot for providing instructions to create VH. Worked perfectly for me – Narendra Vyas Apr 4 '19 at 10:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.