Ive been struggling with this for a few weeks now and dont seem to be getting anywhere. I have installed a module that reads images from a directory 'pub/media/import' however when I navigate to the image I get a 404 error. If I move the image up a directory the image works fine. Any ideas? I assume this is something to do with .htaccess but im unsure which file.

Working: https://www.example.com/pub/media/1.jpg,

404 error: https://www.example.com/pub/media/import/1.jpg


I was slved this issue using configuring htaccess file in server. also can set a permission for media chmod -Rf 777 pub/media

  • could you please add htaccess config here I am also facing same issue. Jun 17 '19 at 8:58
  • @NitinPawar . Download fresh magento 2 (Your version) and upload it's /pub htaccess file into your project pub folder . please
    – Shorabh
    Jun 17 '19 at 9:39
  • I'm facing issue for single instance I have copied file from another instance with same magento version. Still I am facing the same issue. Jun 17 '19 at 11:49

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.