Tuesday, March 21, 2017

Error displaying images in subdomain using laravel 5.3

I have successfully deployed my laravel project to shared hosting (cPanel) and all seems to be working apart from the images. The images stored directly on the server e.g. logo.png don't show up and yet css files in the same public directory show up.

When I try to view the image directly via its URL, I still can't access it and gives me an error of "The image "http://..." cannot be displayed because it contains errors.

Could you please advise? Thanks in advance

Updated: I have tried several alternatives which work locally but not when I upload.

  1. < img src="/img/logo.png" width="100" />
  2. < img src="" width="100" />

None of the above works and even when I try to access it via http://sub.domain.com/img/logo.png . It gives the error above



via DSPNewbie

Advertisement