StackPath integration with XenForo - image attachments not being served from CDN

I have followed all the instructions and have set the externalDataUrl and javaScriptUrl variables correctly:

$config ['externalDataUrl'] = 'https://j8a3z8x5.stackpathcdn.com/data';
$config ['javaScriptUrl'] = 'https://j8a3z8x5.stackpathcdn.com/js';

However, as you can see, the image attachments are still NOT being served out from the CDN. What other settings do I need to add to make this work?

 
Every CDN provider has different instructions, and Stackpath should have this in their documentation. They have multiple setup guides in their online documentation.
 
By default, you cannot offload all /attachments/ files on XF to a CDN.
That is only possible if you are using Cloudflare and force caching on that path.
 
That is only possible if you [...] force caching on that path.
... which should only be done with care (if at all)!

Doing so basically disables access permission checks for attachments and could (worst-case) allow anyone to access attachments posted in conversations for example.
 
  • Like
Reactions: rdn
... which should only be done with care (if at all)!

Doing so basically disables access permission checks for attachments and could (worst-case) allow anyone to access attachments posted in conversations for example.
So what's the best way to improve performance of image-heavy sites? I'm already using Lazy Loading. What other methods are there?
 

Set to 65% compression (PNG/JPG).
 

Set to 65% compression (PNG/JPG).
Yes, I'm already running that add-on, as well. I was hoping to squeeze out additional performance via a CDN, but it's looking like that isn't possible...
 
Are you using Cloudflare?
If yes, you can cache it on CF Edge if you don't care about attachment permissions.
 
Are you using Cloudflare?
If yes, you can cache it on CF Edge if you don't care about attachment permissions.
I'm using StackPath. How do I set up an "edge"? Is that a CDN or Xenforo configuration (or both) that needs to be performed?
 
Back
Top Bottom