Images inpublic folder are only rendered when I am logged in

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
mmm
Posts: 19
Joined: 07 Aug 2018, 07:01

Images inpublic folder are only rendered when I am logged in

Post by mmm » 08 Aug 2018, 14:40

Hi,

After having new aimeos installation and using multi shop I have seen that my images are only rendered ( on frontend) when I am logged in via admin. I have not seen this behavior while using aimeos 2018.4 single site.

Thanks for your help in advance/

Mubashir

Windows 8.1
PHP 7.2.7
Laravel Framework 5.6.29
aimeos 2018.7

User avatar
aimeos
Administrator
Posts: 7881
Joined: 01 Jan 1970, 00:00

Re: Images inpublic folder are only rendered when I am logge

Post by aimeos » 09 Aug 2018, 15:47

This shouldn't be related to being logged in or not. Since 2018.07, the APP_URL from your .env file is used for creating the image URLs. If you use the integrated PHP web server on "127.0.0.1:8000" and in your .env file "http://localhost/" is stored, you won't see any pictures because of the different port (8000) which isn't used in your .env file.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

mmm
Posts: 19
Joined: 07 Aug 2018, 07:01

Re: Images inpublic folder are only rendered when I am logge

Post by mmm » 10 Aug 2018, 12:57

Hi,
Changed .env file
APP_URL=127.0.0.1:8000
but behavior is same.

User avatar
aimeos
Administrator
Posts: 7881
Joined: 01 Jan 1970, 00:00

Re: Images inpublic folder are only rendered when I am logge

Post by aimeos » 10 Aug 2018, 19:10

Tried in a local installation with two sites and locally stored images and it works as expected. Do you see any error in your browser console? Can you check the file URL that is used in the frontend if you can see the image if you paste the URL in a new browser window? The URL should look like this one:
http://localhost:8000/preview/2/1/21b31 ... a1e3a4.png
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

mmm
Posts: 19
Joined: 07 Aug 2018, 07:01

Re: Images inpublic folder are only rendered when I am logge

Post by mmm » 11 Aug 2018, 13:00

Hi,

It is now working. I missed out your installation tip regarding disabling cache in shop.php file.

Regards,

Mubashir

Post Reply