4

I have followed below URL.

https://webkul.com/blog/magento2-3-pwa-studio-setup/

Setup is successfully installed and my local environment is connected to PWA application, but all of my images went missing while browsing PWA. as it is taking images url something like below

https://my-pwa.com:8477/media/catalog/category/timeless.jpg

Any Configuration for changing this or any workaround.

4
  • Can you please share your virtual host file? Commented Apr 16, 2019 at 8:19
  • I haven't created any, I have just changed the .env file for the custom domain. Commented Apr 16, 2019 at 9:45
  • 1
    Go to packages/venia-concept/.env and add pub MAGENTO_BACKEND_MEDIA_PATH_PRODUCT=" /pub/media/catalog/product" MAGENTO_BACKEND_MEDIA_PATH_CATEGORY=" /pub/media/catalog/category" Commented Apr 16, 2019 at 10:52
  • Thanks, it helps me, i have also added project name before /pub Commented Apr 16, 2019 at 11:40

1 Answer 1

4

Go to packages/venia-concept/.env and add pub directory, if still not works you can add whole project URL.

MAGENTO_BACKEND_MEDIA_PATH_PRODUCT="/pub/media/catalog/product"
MAGENTO_BACKEND_MEDIA_PATH_CATEGORY="/pub/media/catalog/category"
3
  • I am just wondering that what it should be done when we move to production. Commented Apr 16, 2019 at 11:54
  • in my setup it's working without change in env file. Commented Apr 16, 2019 at 11:55
  • what you have put there? Commented Apr 16, 2019 at 12:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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