开发者

How can you change images src attributes in mediawiki to access a CDN?

开发者 https://www.devze.com 2023-03-28 22:16 出处:网络
We have a mediawiki with lots of images http://bbref.com/bullpen/ and want to serve images via our CDN for obvious reasons, but I can\'t quite grok how to set things up in mediawiki so that we can get

We have a mediawiki with lots of images http://bbref.com/bullpen/ and want to serve images via our CDN for obvious reasons, but I can't quite grok how to set things up in mediawiki so that we can get

img src="/local/path/to/image.png"

to output as

img src="http://cdn.example.com/local/path/to/image.png"

The CDN 开发者_开发百科is up and running, so I don't need any help there. I just need the fix for mediawiki to change image srcs to point there rather than with a relative link.

thanks, sean


Take a look at the following

  • $wgUploadBaseUrl
  • $wgStylePath
0

精彩评论

暂无评论...
验证码 换一张
取 消