Overview
When you try to add file large images directly into the body of the ticket, you may sometimes experience performance issues on your helpdesk. The helpdesk may stop responding and consumes excessive CPU resources in the process. The more images you add, the worse it becomes.
This article explains why this issue is occurring and how to fix it.
Root Cause Analysis
When you drag and drop or copy and paste images into the text area, the text editor in Kayako (TinyMCE) encodes it as a Base64 or Blob image and uses it as the src attribute for the image tag.
As a result, the size of your HTML post increases significantly because encoded images are typically far larger than other file formats such as png, jpg, or gif. Therefore, if your content has ten images within it, adding ten encoded images increases greatly the size of the post and the time required to process it.
Solution
The developers of the TinyMCE, the rich text editor used in Kayako, suggest that if you need to add large image files to a ticket, it's best to add them as attachments instead of adding them directly to the body of the ticket.
You can follow the process detailed in "Local (Encoded)" Image Uploads in TinyMCE, which shows how to handle the images as uploads instead of encoding them, thereby reducing the amount of time required to process the images. While working on this solution, you need to edit TinyMCE.init
in the file __apps\tickets\staff\View_TicketRenderTrait.php
.