Topic on Project:Support desk

Images and thumbnails not displayed

10
Pmt-it (talkcontribs)

Hi,

I have exported my procedure from Bizagi Modeler 3.1 to Wiki and run with Mediawiki 1.28.

I added those settings below from my LocalSettings.php:

$wgGroupPermissions['*']['upload'] = true;

$wgFileExtensions = array('png','gif','jpg','jpeg','doc','xls','mpp','pdf','ppt','tiff','bmp','docx', 'xlsx', 'pptx','ps','odt','ods','odp','odg');

$wgEnableUploads = true;

$wgAllowImageTag = true;

I allow all rights for all users on the repository below:

/mediawiki/images

The problem is that no images are displayed on my procedure and the <img> tag html have no attribute "src" .

When I set $wgAllowImageTag = false; I can see that <img> tag html have the attribute src with the image path but the <img> html tag is reconized as a text.

Please, someone can help me with settings.

I think I forgot to set anything else.

Thanks for reply.

Regards

Ciencia Al Poder (talkcontribs)

$wgFileExtensions doesn't affect what kind of file you can add to img tag. The src attribute will be dropped if it's not a valid URL (<nokiki>http://servername/path/file.ext</nokiki>). You can't use UNC URLs nor relative URLs.

This post was hidden by Ciencia Al Poder (history)
Pmt-it (talkcontribs)

Hi Ciencia Al Poder,

I don't know what kind of file I can add to img tag because, basically, when I exported my procedure from Bizagi to Mediawiki, it make the export automatically with Bizagi type file. Sorry, I don't know how to explain but all I know is the bug came from the settings of LocalSetting.php and maybe not on $wgFileExtensions because I can see images on the repository /mediawiki/images/...

Maybe it's another settings I have to allow or fill.

Please, let me know if you have a solution.

Thank you

Ciencia Al Poder (talkcontribs)

You can try to start giving the exact wiki markup used to display the image.

This post was hidden by 202.90.68.168 (history)
Pmt-it (talkcontribs)

Ok, but I want wiki to display the image automatically when I export my procedure from Bizagi.I don't think I am able to use wiki markup manually on every procedures I've got, it's too much.

It's weird, when I set $wgAllowImageTag = false; the <img> html tag is interpreted as text and when I remove the quotes to be interpreted as an html tag, the image is displayed.

when I set $wgAllowImageTag = true; the <img> has no attribut "src".

I think I miss a detail.

Please help.

Pmt-it (talkcontribs)

Ok,

I think I found the problem with undisplaying images, it seems that bizagi export images with base64 encode and not ascii encode...So, correct me if I'm wrong but I think that mediawiki not support base64, that's why "src" isn't appeared when I enable image html tag?

How I can solve this problem, please?

Ciencia Al Poder (talkcontribs)

data: is not an allowed URL protocol for MediaWiki, thus the src attribute is dropped. You can try adding it to $wgUrlProtocols

Pmt-it (talkcontribs)

Thank you Ciencia Al Poder,

thanks to you I solved the problem, I had to declare "data: " in $wgUrlProtocols, here is my settings in LocalSettings.php:

$wgAllowImageTag = true;

$wgGroupPermissions['*']['upload'] = true;

$wgFileExtensions = array('png','gif','jpg','jpeg','doc','xls','mpp','pdf','ppt','tiff','bmp','docx', 'xlsx', 'pptx','ps','odt','ods','odp','odg');

$wgEnableUploads = true;

$wgHashedUploadDirectory = true;

$wgUrlProtocols[] = "data:";

Thank you a lot!