decaporg / decaporg/decap-cms

netlify-cms-widget-image: commit/upload the image referenced by url

Open
#6,738 0 comments 1 reaction 0 assignees View on GitHub
area: media-library
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

**Is your feature request related to a problem? Please describe.**
When user is referencing an image by URL, I would like to add this image to the repo, so I can apply the same processing to them, and render them similarly as with regular images.

Disabling "upload by URL" is possible, but it is convenient for the users. Having the image saved to the project’s repo would be much better.

**Describe the solution you'd like**
I would like to customise whether image upload by URL is persisting or just referencing the image.

**Describe alternatives you've considered**
I’ve considered creating own widget-image, but that doesn’t seem to help as it [actually saving the image] would need to be handled by media library.

I’ve also considered to add a hook on entry save and parse the image out, but I couldn’t find a hook to git operations, in order to fetch and persist the image to git. I’d like to rely on the existing auth and existing git client, if the fix was based on preSave hook.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.