XF 1.5 3rd party template referenced images run through proxy.php ?

eva2000

Well-known member
For both XF 1.5 and XF 2.1, I've modified the youtube bbcode media template to serve the default youtube image thumbnail rather than load all the script/video assets on initial page load for better page speed. Example at https://community.centminmod.com/threads/chrome-web-dev-live-2020-on-youtube.19965/

So for youtube video

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.

will only load on forum page load the thumbnail below

mqdefault.jpg


But it seems the image url referenced in the bbcode template is just served directly from https://img.youtube.com/*. Is it possible to tell 3rd party images referenced directly in template code to go through proxy.php itself ?

so if bbcode template references
HTML:
<img loading="lazy" src="https://img.youtube.com/vi/AQqFZ5t8uNc/mqdefault.jpg">
to have it go through and be served via proxy.php

can this be done for XF 1.5 and 2.1 ?
 
Back
Top Bottom