Pasting Images into Drupal: A Practical CKEditor 5 Setup

Illustrated infographic summarizing: Pasting Images into Drupal: A Practical CKEditor 5 Setup

By Greg Nowak. Updated 13 November 2026.

Pasting a screenshot into Drupal should be a small part of writing an article. When editors have to save, rename, upload, and reinsert every capture, a simple procedure update becomes unnecessarily fiddly.

Drupal’s core CKEditor 5 integration can support direct image uploads. A dependable setup also needs clear rules about reusable assets, sensible upload limits, and a check that images survive saving and publication. For a business owner or operations lead, the acceptance test is straightforward: can an ordinary editor complete the job without asking a developer?

How to enable image pasting in Drupal

For a standard Drupal 10 or 11 site using CKEditor 5, start with core functionality. Drupal’s Image plugin connects enabled uploads to Drupal’s own upload endpoint; a separate commercial upload service is unnecessary for this basic workflow.

Make the change on staging first. A text format may serve several content types, so changing it can affect more than the article in front of you.

  1. Find the format editors actually use. Open a typical content form with an editor account and note the selected text format.
  2. Configure that format. Visit /admin/config/content/formats, under Configuration > Content authoring > Text formats and editors.
  3. Check the editor and toolbar. Select CKEditor 5 and move the Image button into the active toolbar.
  4. Enable image uploads. In the Image plugin settings, review file storage, upload directory, maximum file size, and maximum dimensions.
  5. Save and test access. Resolve configuration validation messages and confirm the publishing role can use the format. Keep allowed markup aligned with the enabled plugins.

Then paste an operating-system screenshot into the body field and wait for the upload to finish. Test this simple case before trying an entire document copied from Word.

Choose upload limits that preserve readable screenshots

Use representative content to choose limits. A screenshot of a settings panel needs readable labels; a full desktop capture often needs cropping before upload.

Drupal’s upload settings specify that maximum dimensions trigger scaling. Check the result: shrinking a detailed screenshot can make it useless. Leaving maximum file size blank still leaves PHP’s upload limit in place, and the hosting stack may impose further limits.

Also distinguish upload processing from display size. Dragging an image smaller inside the editor does not establish that visitors download a smaller file.

Agree when to paste and when to use Media Library

My starting rule is simple: paste screenshots made for one article; use Media Library for assets people need to find and reuse. Core direct uploads create files, rather than automatically creating Media items with your organisation’s metadata and display choices.

What the editor needs Suggested route Maintenance decision
Screenshot for one procedure Direct paste Check readability and review it when the procedure changes.
Logo, product photo, or campaign image Media Library Use a recognisable name and identify the approved asset.
Diagram used on several pages Media Library Assign responsibility for updates and check each placement.
Image requiring consistent responsive output Media Library with configured displays Agree image styles, view modes, and mobile presentation.
Choose the route by how the image will be maintained after publication.

If every image requires rights information, approval, or structured metadata, make Media Library the default and decide whether direct uploads belong in that format at all.

Make Media Library a practical alternative

Enable the core Media and Media Library modules, add the Media Library toolbar button, and enable the Embed media filter. Drupal’s media embedding guide recommends placing that filter last, after filters handling allowed HTML, alignment, and captions.

Offer only the media types and view modes editors need. Configure the underlying image displays for responsive output; adding the button alone does not provide that configuration.

Test finding an existing asset and creating a new one with the publishing role. Agree naming conventions and ownership so searching the library remains useful as it grows.

Test from clipboard to published page

Use a normal editor account and a representative article. Paste, wait for upload completion, add appropriate alt text, save, reopen, and inspect the published page on desktop and mobile.

  • Check the actual image URL. Confirm it uses your intended storage or CDN. An image visible in the editor may still reference an external host.
  • Try realistic clipboard sources. Repeat with the browsers, Word versions, and Google Docs workflows your team uses.
  • Exercise the limits. Try an oversized file and check that the failure is understandable.
  • Inspect the content. Check captions, alt text, cropping, and legibility after saving.
  • Check restricted content. Test the image URL while logged out; a protected article is insufficient evidence that its files are protected.

CKEditor distinguishes image uploads from inserting image URLs. Clipboard behaviour therefore needs testing rather than a blanket promise that every copied document will work. If a source fails, save the image locally and upload through the Image button. Avoid Base64 images embedded in body HTML: CKEditor documents their heavier database and transfer load.

Leave a handover the next developer can use

These Drush commands inspect enabled modules and a common text format. Replace basic_html with your format’s machine name:

drush pm:list --status=enabled --type=module | grep -E 'ckeditor5|editor|filter|media|media_library'
drush config:get editor.editor.basic_html
drush config:get filter.format.basic_html

After testing, export configuration in development and review the changes:

drush cex -y

The export can include unrelated configuration. Deploy through the project’s normal review and import process. If a cache rebuild is needed, use drush cr.

Record failures with the browser, clipboard source, role, and format. A failed upload calls for checking requests, limits, and logs; an image disappearing after saving calls for inspecting stored markup and filters.

If your team needs help making this dependable, Greg can review the configuration, agree the image workflow with your editors, and prepare a tested handover for your agency or internal team. Talk to Greg about your Drupal publishing workflow.

Related on GrN.dk

Need help with this kind of work?

Talk to Greg about your Drupal publishing workflow Get in touch with Greg.

Sources

Latest articles

Before changing an AI workflow, check that it still does the job. Use realistic examples, clear release criteria and a comparison with the version running today.

Sending an invoice does not mean it has arrived. Understand delivery statuses, the system requirements coming in 2027, and how focused AI support can help finance teams handle errors and follow-up.

Before scaling AI content, check the pages you already have. Verify claims, resolve overlapping coverage, and give WordPress reviewers control over publication.

Build a refund approval workflow in n8n and Stripe that shows reviewers the exact action, expires old approvals and tracks refunds through to completion.

A timeout can hide a successful job creation. Use stable operation IDs, destination API rules and a clear recovery process to prevent duplicate work.

Does your ChatGPT subscription cover website translation? Understand API credits, access and a WordPress workflow that turns approved Danish content into translation drafts.

An internal AI can keep quoting a deleted policy. Check document updates, indexed passages and cached answers to find where outdated guidance survives.

Codex drew all ten pages of my Ninjai comic from the script Claude wrote in the first test. What made that handover work, and what it cost.

ChatGPT delivered ten painted comic pages; Claude drew one page in code. A practical look at AI tool selection, creative briefs and approval decisions.

Get missing supporting documents under control with a clearly scoped AI workflow that sorts replies, coordinates reminders and gives the bookkeeper a clear follow-up list.