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

Seneste artikler

En sendt faktura er ikke nødvendigvis nået frem. Få styr på leveringsstatus, systemkravene i 2027 og afgrænset AI-hjælp til fejl og opfølgning i økonomiafdelingen.

Rækker jeres ChatGPT-licens til weboversættelser? Få overblik over API-kreditter, adgang og en WordPress-proces fra godkendt dansk tekst til oversættelseskladder.

Få styr på manglende bilag med et afgrænset AI-flow, der sorterer svar, koordinerer påmindelser og giver bogholderen en overskuelig liste til opfølgning.

Lad AI skrive kampagneudkast til Black Friday ud fra godkendte produktdata. Få styr på priser, modtagere og godkendelse, før Mailchimp-kladden bliver sendt.

Få tilbudsmails fra Outlook ind i CRM med AI. Afklar felter, dubletter og sælgeransvar, og mål i en pilot, om løsningen sparer tid og får flere forespørgsler fulgt op.

Gør månedsrapporten lettere at gentage med AI til Excel, Python og faste kontroller. Få styr på import, fejllister og afstemning, så tallene kan efterprøves.

Få godkendte timer fra Clockify med på fakturakladder i Dinero. AI skriver ydelsesbeskrivelser, mens faste regler styrer beløb, godkendelse og genkørsler.

Lad AI kundeservice hente ordrestatus fra Shopify og Shipmondo. Se, hvordan I afgrænser opgaven, kontrollerer kundens identitet og sender usikre sager videre.

Når kunden beder om indsigt, kan AI hjælpe med at samle materiale fra WordPress og Microsoft 365. Se, hvordan I holder styr på datakilder, ansvar og kontrol.

Når en ingrediens ændres, kan menukortet kræve rettelser, selv om opskriftsdatoen står stille. Sådan kan AI hjælpe med gennemgang og godkendelse i WordPress.