Legacy Knowledge Base
Published Jun. 30, 2025

Not able to paste image directly into the CKEditor (Web content)

Written By

Madhusudan Sharma

How To articles are not official guidelines or officially supporteddocumentation. They are community-contributed content and may not alwaysreflect the latest updates to Liferay DXP. We welcome your feedback toimprove How to articles!

While we make every effort to ensure this Knowledge Base is accurate, itmay not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with anyfeedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack"publication program, made available for informational purposes. Articlesin this program were published without a requirement for independentediting or verification and are provided "as is" withoutguarantee.

Before using any information from this article, independently verify itssuitability for your situation and project.

Issue

  • Not able to directly paste the image in CKEditor (Webcontent).

Steps to Reproduce:

1. Start Liferay Quarterly Release 2023.q4.4.
2. Navigate to Product Menu > Web Content > Click 'New Button' and then 'Basic Web Content'.
3. Give it a name, let's say 'Test'.
4. Now, add some content and copy-paste an image directly into the CKEditor (using ctrl+v).
5. Publish the web content.
6. Open the saved web content, the image is not there and the below warning can be observed in the logs:

WARN [http-nio-8080-exec-1][AntiSamySanitizerImpl:131] The img tag contained an attribute that we could not process. The src attribute had a value of "data:image/jpeg&#59;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxISEBUSEBIVFRUXEBUVFhUVFQ8VFRcXFRYWFxUWFhUYHSggGBolGxcVITEhJSkrLi4uFyAzODMtNygtLisBCgoKDg0OGhAQGy0lICUtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLf/AABEIAMoA+QMBEQACEQEDEQH/xAAcAAABBQEBAQAAAAAAAAAAAAAAAgMEBQYBBwj/xABGEAACAgEBBQQF ............ This value could not be accepted for security reasons. We have chosen to remove the entire img tag in order to continue processing the input. 

Expected Behavior: The image should be added to the web content when directly pasting (using ctrl+v).
Observed Behavior: The image is not getting added to the web content when directly pasting (using ctrl+v).

Environment

  • Liferay DXP 7.4

Resolution

  • The observed behavior is a known issue/bug.
  • If a hotfix is required for this issue, please create a support ticket requesting a hotfix by attaching patch details.
  • Installing Fix Packs and Hotfixes on Liferay DXP will guide to installation of the hotfix in the respective environment.
Did this article resolve your issue ?

Legacy Knowledge Base