Let Delta Chat indirectly support the clipboard and paste images from other programs

Indirectly allows Delta Chat to support pasting clipboard pictures from other programs

This method is only available for Windows desktop version.

  1. Create a new PowerShell script in the path you want, with the extension ps1, paste the following code into this file and modify the specified line, save it after the modification is complete;
Add-Type -Assembly PresentationCore
$img = [Windows.Clipboard]::GetImage()
if ($img -eq $null) {
# <tmppath> Replace with the actual temporary directory
$fcb = new-object Windows.Media.Imaging.FormatConvertedBitmap($img, [Windows.Media.PixelFormats]::Rgb24, $null, 0)
$filename = (([guid]::NewGuid()) -replace'[-T:]','')
if(-Not (Test-Path $tempFileDir -PathType Container)){
    mkdir $tempFileDir
$file = "$tempFileDir\{0}.png" -f $filename
Write-Host ("`n Found picture. {0}x{1} pixel. Saving to {2}`n" -f $img.PixelWidth, $img.PixelHeight, $file)

$stream = [IO.File]::Open($file, "OpenOrCreate")
$encoder = New-Object Windows.Media.Imaging.PngBitmapEncoder
# <copyqpath> Replace with CopyQ's program path
Push-Location "<copyqpath>"
cmd /C ".\copyq.exe copy image/png - < ""$file"""
del "$file"
  1. Visit CopyQ to download CopyQ;
  2. Start after the download is complete, press F6 in the CopyQ window;
  3. Click “Add”, then double-click “New command”;
  4. Click “Automatic” on the right;
  5. Paste the following command:
  1. Modify the above command and replace <ps1path> with the actual script path (the backslash in the path needs to be written twice);
  2. Rename this command and click “Apply”;
  3. Now you can try to copy a picture from a browser and other programs and paste it into Delta Chat.


  1. PowerShell script execution will be very slow, you can paste the following code into PowerShell and press Enter twice, wait a while.
$Env:PATH = [Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory()
[AppDomain]::CurrentDomain.GetAssemblies() |% {
  $pt = $_.Location
  if (! $pt) {continue}
  if ($cn++) {''}
  $na = Split-Path -Leaf $pt
  Write-Host -ForegroundColor Yellow "NGENing $na"
  ngen install $pt

This code can only be improved to a certain extent.
2. This script may be blocked during execution. At this time, execute the following command and press Y + Enter, and then re-execute the script:
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser
3. During the copy and paste operation, CopyQ must keep running.

The above method is not perfect, the processed script still takes about 1 second.
Still waiting for developers to perfect the paste function for the Windows version.


Is this what I think it is? I can just copy an image from say Signal or Telegram or wherever on the web to my clipboard and just CTRL + V into the input field in Delta and it’ll auto attach inline the image? Or does it add as attachment?


This article has expired, please update to 1.22.x.

1 Like

it adds it as attachment