ckeditor / github-writer

GitHub Writer - WYSIWYG Rich-Text Editor for GitHub, powered by CKEditor.
https://ckeditor.com/
Other
380 stars 61 forks source link

Commit images to repository rather then uploading to user-images.githubusercontent.com/ #291

Open ericanastas opened 2 years ago

ericanastas commented 2 years ago

I don't know if this is possible, but when editing markdown files in a repository or wiki I would like images to be committed to the repo and not separately to githubusercontent.com. I want the images files to be stored with, and versioned with the rest of the repository file and not require an internet connection to be displayed.

So rather then referencing an image like this:

![](https://user-images.githubusercontent.com/0000000/000000000-00000000-0000-0000-0000-000000000000.png)

An image link like like this will be created after the file is uploaded.

![](myimage.jpg)

Alternatively, the images may be uploaded to a sub folder relative to the markdown file like assets/ or images/ .

![](assets/myimage.jpg)
![](images/myimage.jpg)
mateuszzagorski commented 2 years ago

If you'd like to change the way you're referencing the images, you can do it in a way that you've already mentioned:
1. Upload images to a folder/subfolder.
2. Edit, for example, the Readme file, and in source mode, change the reference to the image using the relative path so it may look similar to this:
![test-image](../raw/main/images/test-image.png)

This enhancement to the GH Writer is not something that we plan to implement in the near future.