My prestashop is hosted on a DigitalOcean droplet. I want to use DigitalOcean Spaces as a MediaServer in my shop. But if I set up the spaces origin (https://xxxxxxxx.fra1.cdn.digitaloceanspaces.com) as MediaServer in Prestashop, then my images are missing. In the product page source, the img src seems to be right, it points to the CDN address. The main problem is, that prestashop dont sync my images to the CDN.
I have tried Bunny CDN before, and it was ok. The images were uploaded automatically.
How should I set up DigitalOcean Spaces to work like Bunny CDN?
Prestashop has no function to sync/copy images to a remote destination, the images will always be uploaded to the filesystem where it is installed.
"Media server" function in the back office only tells Prestashop the web path from which the images have to be retrieved, so it is your CDN service that have to handle the image "pickup and copy" from the backend server, so first make sure your CDN service can work like that and it is not a different object storage service where you have to manually upload resources.
Then, you have to make sure that CDN is correctly configured to point correctly to your backend so that the first web query reads the image from the server and the subsequent ones from the CDN.
Being aware of that, a typical approach is to create a subdomain like "static.mywebsite.com" with a CNAME to your CDN "https://xxxxxxxx.fra1.cdn.digitaloceanspaces.com" , then you can enter "static.mywebsite.com" in the media server space of Prestashop backoffice.