如何更改MediaWiki中的image src属性以访问CDN? [英] How can you change images src attributes in mediawiki to access a CDN?

查看:119
本文介绍了如何更改MediaWiki中的image src属性以访问CDN?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个包含很多图像的MediaWiki, http://bbref.com/bullpen/出于显而易见的原因,通过我们的CDN提供图像,但是我不太了解如何在mediawiki中进行设置,以便我们可以

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"

输出为

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

CDN已启动并正在运行,因此那里不需要任何帮助.我只需要修复mediawiki即可将图像src更改为指向该位置,而不是使用相对链接.

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.

谢谢, 肖恩

推荐答案

看看以下内容

  • $wgUploadBaseUrl
  • $wgStylePath

这篇关于如何更改MediaWiki中的image src属性以访问CDN?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆