How can you change images src attributes in mediaw

2019-09-06 02:20发布

问题:

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

回答1:

Take a look at the following

  • $wgUploadBaseUrl
  • $wgStylePath


标签: mediawiki cdn