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

瘦欲@ 提交于 2019-12-25 01:52:58

问题


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


来源:https://stackoverflow.com/questions/7114177/how-can-you-change-images-src-attributes-in-mediawiki-to-access-a-cdn

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!