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

add Photopea shortcut #2

Merged
merged 1 commit into from Nov 20, 2021
Merged

add Photopea shortcut #2

merged 1 commit into from Nov 20, 2021

Conversation

bbbenji
Copy link
Contributor

@bbbenji bbbenji commented Nov 19, 2021

This function may have issues with larger images as they are being sent as URI data in the URL. The reason we cannot pass the original URL to Photopea is twofold.

  1. CORS
  2. any edits made in BetterViewer itself would not be passed along to Photopea

Not exactly sure how to resolve this but I have 2 ideas.

  1. hiding the option to edit in Photopea if the image is over a certain file size
  2. uploading to Imgur first then passing the URL to Photopea (might run into CORS problems)

Let me know if you have any ideas or if this PR requires any changes for a merge.

@Ademking
Copy link
Owner

Ademking commented Nov 20, 2021

@bbbenji You're amazing! I really appreciate your contribution
Thanks a lot! Your idea is so cool 👍 You made my day ❤️

This function may have issues with larger images as they are being sent as URI data in the URL. The reason we cannot pass the original URL to Photopea is twofold.

  1. CORS
  2. any edits made in BetterViewer itself would not be passed along to Photopea

Not exactly sure how to resolve this but I have 2 ideas.

  1. hiding the option to edit in Photopea if the image is over a certain file size
  2. uploading to Imgur first then passing the URL to Photopea (might run into CORS problems)

Let me know if you have any ideas or if this PR requires any changes for a merge.

I found a solution:

  1. We upload the image using ImgBB (many users requested to change Imgur with ImgBB) https://api.imgbb.com
  2. We use Photopea to open the uploaded image (No CORS problems found)
    I've test it and It's working fine 👍

Thank you again for your time and effort!
I will add the list of contributors in "About" page.

@Ademking Ademking merged commit 1f1577b into Ademking:master Nov 20, 2021
@Ademking
Copy link
Owner

@all-contributors please add @bbbenji for code

@allcontributors
Copy link
Contributor

@Ademking

I've put up a pull request to add @bbbenji! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants