Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image widget "Insert From URL" should be optional #5532

Closed
madsem opened this issue Jun 27, 2021 · 12 comments
Closed

Image widget "Insert From URL" should be optional #5532

madsem opened this issue Jun 27, 2021 · 12 comments
Assignees
Labels
good first issue type: feature code contributing to the implementation of a feature and/or user facing functionality

Comments

@madsem
Copy link

madsem commented Jun 27, 2021

The feature introduced here: https://github.com/netlify/netlify-cms/pull/4700/files
should be optional imho.

It's a great feature, but in some cases it encourages hotlinking haha.
I would prefer to be able to turn it off, just maybe like

label: "Hero Image",
      name: "image",
      widget: "image",
      choose_url: false,
      allow_multiple: false,
      default: "/img/shareable-default.jpg",
      i18n: true,
@madsem madsem added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Jun 27, 2021
@madsem
Copy link
Author

madsem commented Jun 27, 2021

Thanks for pointing me in the right direction, I will have a looksy :)

@Edald123
Copy link
Contributor

Edald123 commented Jun 27, 2021

Hi! I'm new to the project and I would like to try this issue if no one is working on it yet. Is it possible?
If yes, is there more information I would need to start working on the issue? Thank you!

@madsem
Copy link
Author

madsem commented Jun 27, 2021

I have a huge work load already, so i would gladly give you the reigns :)

@Edald123
Copy link
Contributor

Great, I can take it and start working on it. :D

@Edald123
Copy link
Contributor

Hi! I'm working on the issue and I would like to ask:

  • What would be the expected behavior of this feature?
  • What would be the way that you expect to activate and de-activate the widget?
    Thank you!

@madsem
Copy link
Author

madsem commented Jun 29, 2021

Imho it should be activated by default, just as it is now, that way it's backwards compatible.

Accept an option to deactivate the url link, something like from_url: false.

And I personally would expect the behavior to be: Once you set from_url to false, the link to add from a url isn't shown anymore in the UI. So that a content manager can only upload images to media library or select an existing image.

@Edald123
Copy link
Contributor

Thank you! I'm going to be working on that!

@Edald123
Copy link
Contributor

Edald123 commented Jul 5, 2021

PR created. Let me know if any changes are needed, thank you!

@erezrokah
Copy link
Contributor

Closed via #5572

@madsem
Copy link
Author

madsem commented Jul 5, 2021

@erezrokah when will the next version be released that includes this feature?

@erezrokah
Copy link
Contributor

@madsem, this was released in [email protected] and [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

No branches or pull requests

3 participants