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

[Bug]: Sometime cannot load image from base64 #8555

Closed
7 tasks done
huy-lv opened this issue Jan 1, 2023 · 2 comments
Closed
7 tasks done

[Bug]: Sometime cannot load image from base64 #8555

huy-lv opened this issue Jan 1, 2023 · 2 comments

Comments

@huy-lv
Copy link

huy-lv commented Jan 1, 2023

CheckList

  • I agree to follow this project's Code of Conduct
  • I have read and followed the Contributing Guide
  • I have read and followed the Issue Tracker Guide
  • I have searched and referenced existing issues and discussions
  • I am filing a BUG report.
  • I have managed to reproduce the bug after upgrading to the latest version
  • I have created an accurate and minimal reproduction

Version

5.3.0

In What environments are you experiencing the problem?

Chrome

Node Version (if applicable)

14.19.3

Link To Reproduction

https://jsfiddle.net/huylv177/62rwofk5/12/

Steps To Reproduce

  1. I use fabric.Image.fromURL(base64) to add image to canvas, but sometime its show empty page. I logged callback from fromURL function below:
  • When website show empty canvas

image

  • When website show correct image

image

Expected Behavior

Show correct image

Actual Behavior

Show nothing

Error Message & Stack Trace

No response

@huy-lv huy-lv changed the title [Bug]: [Bug]: Sometime cannot load image from base64 Jan 6, 2023
@ShaMan123
Copy link
Member

ShaMan123 commented Jan 6, 2023

I can reproduce but not sure what is going on.
Workaround: https://jsfiddle.net/g2h6mn41/ use the dom to load the image

@melchiar
Copy link
Member

@huy-lv you're referencing the base64 variable before you've defined it

https://jsfiddle.net/melchiar/65jecvxt/

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

No branches or pull requests

3 participants