-
Notifications
You must be signed in to change notification settings - Fork 22
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][WebpMachine][decode] Cannt decode base64 asset #46
Comments
this is an interesting bug, thanks for filing it. hopefully we can figure this out and apply a fix soon. do you have a particular webp data uri that you can share, that we can experiment with? edit: oh, i see you've attached a .zip file, i should be able to take a look at this tomorrow. which browser are you using that you're finding this issue? |
I found this bug in IOS Safari 13.3 (there is no native webp support). I have builded simple demo for you |
I have strarted use webpMachine after window.onload - works well |
@aapavlov1994 hello, i believe i may have found the problem. data uri's are only supported as of v0.0.2, so you just need to upgrade to <head>
<meta charset="UTF-8">
<title>Title</title>
- <script src="https://unpkg.com/[email protected]/dist-cjs/polyfills.js"></script>
- <script src="https://unpkg.com/[email protected]/dist-cjs/webp-hero.bundle.js"></script>
+ <script src="https://unpkg.com/[email protected]/dist-cjs/polyfills.js"></script>
+ <script src="https://unpkg.com/[email protected]/dist-cjs/webp-hero.bundle.js"></script>
<script src="./example.js"></script>
<script src="./testWebp.js"></script>
</head> i reproduced the problem locally, and i do not understand the mechanics about why you first receive an error, and then receive a success.. anyways, upgrading to v0.0.2 seems to resolve this issue 🤷♂️ i noticed the readme was outdated, showing v0.0.1 in the examples, so i've now fixed that in 0b66258 please let me know if this solution works for you, cheers 🍻 |
Yes, this fix truly cured demo! So i builded new demo (need localhost for running and installing package) |
@aapavlov1994 i've noticed a couple of issues.
|
|
Sometimes WebpMachine cannt decode base64 webp assets and i cannt understand the reasons
Example base64 asset can be found in zip file bellow
WM.decode(convertDataURIToBinary(example)) // error
example.zip
The text was updated successfully, but these errors were encountered: