Topic on Project:Support desk

[RESOLVED] Is it possible to set a separate url for thumbs images?

4
Summary by Florianschmidtwelzow

Can be made with Manual:$wgUploadStashScalerBaseUrl. --Florianschmidtwelzow (talk) 13:31, 9 August 2014 (UTC)

Deletedaccount4567435 (talkcontribs)

I know $wgUploadPath set the URL of the upload directory. However, I would like to set another sub domain for thumbs images. Is this possible?

Florianschmidtwelzow (talkcontribs)

Sure :) You can use $wgUploadStashScalerBaseUrl to define a remote base for thumbnailing. Here the description of this value from DefaultSettings.php:

To enable remote on-demand scaling, set this to the thumbnail base URL. Full thumbnail URL will be like $wgUploadStashScalerBaseUrl/e/e6/Foo.jpg/123px-Foo.jpg where 'e6' are the first two characters of the MD5 hash of the file name. If $wgUploadStashScalerBaseUrl is set to false, thumbs are rendered locally as needed.

Deletedaccount4567435 (talkcontribs)

Cool! Thank you!

Deletedaccount4567435 (talkcontribs)

Well, actually not fully solved. this $wgUploadStashScalerBaseUrl setting will disable mediawiki's own render function. Therefore the remote server should be able to get images from wiki and then scale it as wiki needs. If the remote server can not scale images, setting in $wgUploadStashScalerBaseUrl will be ignored.

Therefore, This setting can not improve CDN performance/ reduce expenses by set another sub domain for thumbs images.

Reply to "[RESOLVED] Is it possible to set a separate url for thumbs images?"