Can't copy `Text & Images` from readme.md file?

In my Readme.md file have Text & Images, and then I select all and copay.
But can’t copy the images when I pasted it on Ms-Word.

# Introduction

## Login

![](/source/images/login.png)

- Username: ឈ្មោះគណនេយ្យ
- Password: លេខសម្ងាត់

  • Ms-Word
    image

Hi @theara and welcome to the GitLab community forum!

While it’s easy to copy text from a README.md file, copying images or media contained in a markdown file is not possible through copying the markdown syntax. This is because the images appear only when the markdown is rendered.

To copy/paste from markdown (.md) to a word doc, you should be able to do this copying the rendered output. You’ll need to highlight and copy the image being displayed and the text, but not the markdown syntax itself.

If this does not work, you may have to copy/paste or insert the images separately.

There are also a number of ways to directly convert a markdown file to a word doc.

One of my favorite methods for converting markdown into other formats is to use pandoc on the command line:

pandoc -o readme.docx -f markdown -t docx README.md

@gitlab-greg, very thanks for your reply.
But I don’t understand …???

You’ll need to highlight and copy the image being displayed and the text,

Selected the Text and Images (Select All), and the copy like this

@theara Thanks for the screenshot. Sorry for being unclear.

Copying the image in this way fails because it is linking to a local copy of an image that does not exist locally.
An easy way to do this might be to copy/paste the text separately, then use the “Copy image” address to copy/paste each image.

1 Like

Thanks again, So I will work hard to copy by individual image and text.
(Not like github that it could do this!)
Excuse me, don’t have any solution?

The problem MS Word is unable to pull your image assets from the internet because the HTML contains a relative path (pointing to a local file, not a remotely accessible file)

The best way to handle this would be to include the full URL for any image assets in your markdown. For example:

If you copy an image with a relative path:

[![DevOps Stages](/gitlab-org/gitlab-ce/raw/master/doc/img/devops-stages.png)]()

it renders as this in a word doc:

If using the full URL:

[![DevOps Stages](https://gitlab.com/gitlab-org/gitlab-ce/raw/master/doc/img/devops-stages.png)]()

It renders as expected in a word doc:

DevOps Stages