Hello! I'm creating my first Solidus store using Amazon S3 for file storage, as suggested by Solidus. The images are displayed correctly on the website, although, after some time, they break and don't appear unless I upload them again. I have no clues on how to fix this, any suggestions?
j
Jared Norman
08/29/2023, 10:17 PM
You need to fix your ActiveStorage/S3 setup so the images are public.
Jared Norman
08/29/2023, 10:18 PM
The product pages are cached but if you used the default setup the S3 objects will be private. ActiveStorage will generate expiring public URLs for them. Those expiring URLs get cached, so the images stop working once they expire.
g
Gabriel Fonseca Sales
08/29/2023, 10:19 PM
That makes a lot of sense, isnt it dangerous to make them public? Or is it just for visibility?
j
Jared Norman
08/29/2023, 10:21 PM
There is no reason your product images shouldn't be public.
g
Gabriel Fonseca Sales
08/29/2023, 10:23 PM
Thank you, in addition, should bucket versioning be also always enabled?
j
Jared Norman
08/29/2023, 10:42 PM
Up to you. I don't typically use it, but I'm sure it's saved someone's ass before.