-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Add support for uploading images included in pasted HTML content #15052
Conversation
Hey! Thanks for the contribution. Before jumping into reviewing the code in depth, it would be great to get some explanation of what was introduced. The #5152 has a very long discussion of different scenarios. If you could provide:
|
Hey @Witoso! The main scenario we're interested in is avoiding hotlinking images. We are migrating to CKEditor from Froala, which had built in support for uploading images to a server, rather than hotlinking images, which is generally considered bad practice. This PR adds support for:
Some remote servers may include CORS headers that prevent the image from being downloaded, so the You're correct in thinking this is enabled by default. I think it would make sense for this to be the default functionality, due to hotlinking images being generally considered a bad practice as mentioned before. If it would be considered a breaking change, or if there are any other backwards compatibility concerns, I'd understand if enabling it via a config option was preferred. As for copyright concerns, as far as I'm aware copyright is based on the domain the image is displayed on rather than the domain it's hosted on - but I could be wrong here. The PR may require some additional error handling for images that can't be downloaded, as I haven't tested this scenario yet. |
After some more testing it looks like any issues fetching the image are handled by existing error handling logic for the loader, since I'm just passing the If an image can't be fetched, the |
I think both act of hot linking, and the download action could be illegal (depending on country, jurisdiction, fair use, etc., not a legal advice 😉). So I think we could get this argument out of the way. I think giving users an option is most likely a must-have, we need to discuss internally what's the default, etc. I will get back to you.
Gotcha, most likely needs to be removed afterward when you replace the |
No worries, makes sense.
The attribute is only set on the |
As we discussed it, we should keep by default the current behavior, and the configuration option should be added, I guess to the |
There has been no activity on this PR for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the contribution, leave a comment or reaction under this PR. |
We've closed your PR due to inactivity. While time has passed, the core of your contribution might still be relevant. If you're able, consider reopening a similar PR. |
Suggested merge commit message (convention)
Feature (image): Add support for uploading images included in pasted HTML content. Closes: #5152