-
Notifications
You must be signed in to change notification settings - Fork 138
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
Uncaught (in promise) DOMException: The source image cannot be decoded. #24
Comments
Can you provide the image (or image set) that ran into decoding issues? Do you have an example of this in the wild, currently? Thanks for raising this! Also, please be aware that 2.0.1 is not a supported release yet. :) 2.0.0 is the latest official release over on the releases page. |
It's a jpg image. Unfortunately I can't provide the image. I am using the 2.0.1 version because I have my own classes on some of my img elements (#18). Generally, what would be the cause of the decoding error? Some other images give me this error as well depending on how fast I scroll (but not all the time). I should also note that the image I am using is very large and is resized to a smaller size using CSS. |
Fixed in the 2.0.2 release. |
I'm reopening this issue as version 2.0.2 has not fixed this issue. I am getting the same error as before. Upon inspecting the element, the I downloaded version 2.0.2 from the releases page.
Does the If I set the src to an image that exists, it is able to load alright. I thought Edit: I just realised that commenting does not reopen the issue, could you please reopen it as I believe it is still an issue? |
Unminified version error. Much more useful compared to the other error I gave above. Uncaught (in promise) DOMException: The source image cannot be decoded.
Promise.then (async)
yallLoad @ yall.js:24
entries.forEach.entry @ yall.js:157
IntersectionObserver @ yall.js:148 |
I also want to say that there is nothing wrong with the image I am using because it loads fine without |
The crux of the issue appears to be this:
If I don't set an I'm not saying you're not having a problem. You clearly are, and I believe you at your word. But what I'll need from you in order to continue is a concrete use case from you that reproduces the error, preferably in the form of a Codepen or other test page. Let me know when you have that up, and I'll be happy to take a look at what's going on! 😊 |
I tried creating a new page with I don't really know why it sometimes works on the website I am developing. I can't share the code for that website just yet. It may be because of the actual image that I am using or because of other code. I might revisit this later on once the website is completed and see if tl;dr When the website I am working on goes live, I'll send you some code. |
I'm sorry you're having this kind of trouble. It's starting to make me wonder if async decoding is worth the trouble. 🤕 If at any point you could share the code, let me know. I haven't received this error, but just because no one else has said anything doesn't make me think this isn't a potential problem. I'll keep this issue open for the foreseeable future in case anyone else is having trouble. In the meantime, try this unofficial build which removes async image decoding: yall-2.0.3.min.js.zip Best of luck! |
Same exception with Tested with
|
I ran in to this issue when using a src image that returned a 400 error. I have an onerror event that is firing when an image can not load. This was not working when the image gets hung up on the decode. |
To be honest, I think I'm going to be much more likely to just drop |
maybe allow overriding env so users can disable env.asyncDecodeSupport? |
That's a possibility. The only issue is that I worry about the side effects of decodes on I personally believe the complexity of trying to lazy load with |
Thank you for merging that in. I think you are right about removing image decode. I saw this: |
No worries. I think there are distinct use cases for Other approaches involve your |
Hello, you forgot to update distribution version. |
My apologies @malchata for not sending you the code where the issue was caused. It looks like you have this under control however if you really do need some source code to debug, I might be able to find the old code somewhere on my Gitlab repo. |
No problem @octoxalis. To be honest, I think I'm going to simply remove use of My focus isn't really on this script at this time, as I have some writeups I need to finish first, but I'm aiming to get these issues addressed and do a final feature complete release (per #29) and limit future releases to bugfixes only. |
Uncaught (in promise) DOMException: The source image cannot be decoded.
Any idea why? It works for other images.
Thank you for making this JavaScript script.
I am using the
yall-2.0.1.min.js
file.The text was updated successfully, but these errors were encountered: