Bump for this.
also .... is there a way to keep the pic on the server as a backup while still pushing it & serving it from a CDN?
Don't use your server as a backup.
Backups for S3 should be done onto other S3 services, S3 Glacier, or a dedicated backup drive/service.
As for how images are served, depends on how you set it up.
The documentation suggests serving avatars and attachment thumbnails via the S3 CDN while serving the larger images via your server.
This is a sort of hybrid between offloading and security. Though it is not ideal.
You can actually serve both either way and even get Xenforo to serve JS and CSS via S3 via this config if you wish. Check the docs for more info on this. Quite a lot of customization and performance improvements can be made by setting a few things up in there.
It is a balance of security and offloading load onto CDN rather than your own server.
If you have private forums, and you don't want any content being accessible from non-logged-in/users without permission, then serve everything via your server, not the CDN. Hopefully, images and stuff are cached on the server so you don't pull it on every request...
Is anyone able to confirm if this is the case currently?
If your forum is fully public, then you can serve everything via the S3/CDN and completely offload those requests from your HTTP server.
Ideally, we need to make use of pre-signed URLs with S3. This would allow Xenforo to give permission based on user-level while serving content from S3/CDNs that support such authentication features.
Describes how to set up your objects so that you can share them with others by creating a presigned URL to download the objects.
docs.aws.amazon.com
This has been requested already as part of an overhaul of the attachment system, hopefully, they can work on it soon. Would be a massive improvement!
Would pay for this as an addon
wink wink nudge nudge...
when using an external storage provider .. Xenforo has to connect to storage API to get the file to serve to user. it costs server and network resources and can cause unexpected issues when external data provider is slow .. using presigned URLs will allow serving files directly from storage...
xenforo.com
AFAIK, there is no solution to caching images and attachments outside of Xenforo while protecting files.