Skip to content
Advertisement

Laravel images not shown in any browser while firefox throwing “Image x cannot be displayed because it contains errors” error

My laravel app’s images are not being shown in Firefox Chrome or Edge Firefox shows a more explicit error saying “The image [image] cannot be displayed because it contains errors”

ie: the following image is not being shown:

http://test-gestion.pedifacil.com/storage/app/public/1/logo_196_196.png

but a txt in the same folder is being shown so it does not seem to be problem of wrong symlink

http://test-gestion.pedifacil.com/storage/app/public/1/hola.txt

OS: Ubuntu 16.04

Note: Pagespeed has already been disabled in apache.

Note2: Apache error log is not showing anything related to this.

Note3: The same image put in the htdocs/ folder does not fail. See: http://test-gestion.pedifacil.com/logo_196_196.png so does not seem to be related to an apache global malfunctioning

How can I get to know what is causing the error? Thank you.

Advertisement

Answer

solution:

  • Put back the laravel public/ folder in the root of the laravel app path (/opt/bitnami/apache2/laravel_app/public/)
  • Then created an apache “/l/” alias pointing to /opt/bitnami/apache2/laravel_app/public/
  • Update the .env file for updating the app url to “http://example.com/l/
4 People found this is helpful
Advertisement