Hi,
I dont understand how to show image in ticket history and articles.
I can see images during articles edit or ticket reply/comment in CKEditor. My user receive images as inline encoded in base64 in mail.
In ticket history i can see image when i download the html source.
But image dont show web UI and i’m unable to find the option needed to show image in ticket history.
In my RT_SiteConfig.pm i have those options:
Set($ShowRemoteImages, 1);
Set($ShowTransactionImages, 1);
Set($PreferRichText, 1);
Any idea?
Kind regards,
Edit: the problem concern images inserted via copy/past in CKEditor. Images receveived by mail are visible in ticket history.
Hi. For me it’s enough (RT 5.0.5):
Set($ShowTransactionImages, 1);
I can’t find $ShowInlineImages
in the code. Is it a new setting in 5.0.6?
lunchtime43:
ShowInlineImages
I also don’t have ShowInlineImages and I’ve searched my rt5.0.6 build.
Also, the setting Set($ShowTransactionImages, 1); is default and I’ve never had to mess with any of it, and I see all attached images inline in the ticket history/transaction log. It just seems to work as always.
Hi, the first 2 answers come from bot, that why they gave false info about value who does not exist.
In my case i see attached inline image from answer comming by mail, but i dont see my own image in ticket transaction when image was copy/pasted in ckeditor with an anwser from web gui.
Users receive my answer with my image copy/pasted, but it does not appear in ticket history in the web gui. I’m in RT 5.0.6.
I have something working now, but i dont know if it can cause a security issue.
Create an overlay by copying the file /opt/rt5/lib/RT/Interface/Web/Scrubber.pm to /opt/rt5/lib/RT/Interface/Web/Scrubber_Local.pm
Edit the file
/opt/rt5/lib/RT/Interface/Web/Scrubber_Local.pm
Change the line (or comment)
push @src, qr/^cid:/i
by
push @src, qr/^cid:|^data:/i
if ( !$RULES{'img'} && ( RT->Config->Get('ShowTransactionImages') or RT->Config->Get('ShowRemoteImages') ) ) {
my @src;
# push @src, qr/^cid:/i
push @src, qr/^cid:|^data:/i
if RT->Config->Get('ShowTransactionImages');
Kind regards,
Finnley
October 14, 2024, 5:18pm
10
periway:
I dont understand how to show image in ticket history and articles.
I can see images during articles edit or ticket reply/comment in CKEditor. My user receive images as inline encoded in base64 in mail.
In ticket history i can see image when i download the html source.
But image dont show web UI and i’m unable to find the option needed to show image in ticket history.
In my RT_SiteConfig.pm i have those options:
Set($ShowRemoteImages, 1);
Set($ShowTransactionImages, 1);
Set($PreferRichText, 1);
Any idea?
Kind regards,
Edit: the problem concern images inserted via copy/past in CKEditor. Images receveived by mail are visible in ticket history.
When you paste an image into CKEditor, it’s often embedded as a Base64-encoded string. While email clients may render these images correctly, the ticket history viewer in your RT web interface might not support rendering Base64-encoded images by default.
I’ve tried to copy/paste from the RT editor and it doesn’t work for me too.
I’ve tried @periway ’s overlay but it doesn’t work for me. I can see in the source:
<img src="data:image/png;base64,iVfh7kjs7...
And the UI says that the message is too big to show it. It seems that history can’t show embedded inline images in base64.
Following this thread:
I have made a fresh install of RT 4.2.1 yesterday and noticed, that when I
create a ticket using RT Web interface (rich text) and paste a screenshot or
any other image to the editor, this image not being shown in either e-mail
sent to requestor (tested with Outlook 2003 and Outlok 2010), or in ticket
history.
Outlook only shows placeholder for the image (apparently cannot decode it),
and ticket history displays ‘Message body is not shown because it is too
large’ (see picture below). Actua…
I’ve set MaxInlineBody to 0, reloaded the ticket and now I can see the inline image.
Update: @periway ’s overlay is also needed.
Couldn’t find a way for this to work in articles. I’ve tried too adding a custom field to upload files and then link to them as said in RT 5.0: is there a way to insert picture in Articles? without luck.
periway
November 6, 2024, 9:57am
14
Hi,
For articles i have a custom field applyed on all my articles classes:
Name “content HTML”
Type : “Fill in one HTML area”
Applyed : “Articles”
Activated
On my article class:
Name of class : “xxxx”
Activated
Include custom field “Content HTML value”
Now create the overlay needed:
mkdir -p /opt/rt5/local/lib/RT/Interface/Web
vi /opt/rt5/local/lib/RT/Interface/Web/Scrubber_Local.pm
Insert the code bellow (i’ve found it on GIT of easter-egg www.request-tracker.fr ) in the Scrubber_Local.pm file:
package RT::Interface::Web::Scrubber;
$RULES{‘img’}->{‘src’} .= “|”.qr/^cid:|^data:/i if RT->Config->Get(‘ShowTransactionImages’);
1;
On your RT_SiteConfig.pm you need to add this policy:
Set(
%ScrubCustomFieldOnSave,
Default => 0,
‘RT::Ticket’ => 1,
‘RT::Transaction’ => 1,
);
I hope this can help.
Kind regard,