-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
dinamically generated images are ignored #90
Comments
What does that mean “they are ignored”? Please post the HTML-Source code of one of the ignored images, your issue is probably not related to the image URLs but the HTML code instead. |
The linter returns This is a sample code:
Thanks for your support |
I just tried your example HTML code and got the expected Are your images already there after the page finished loading in the browser? |
The images were already there when I lauch the linter I'll try to set up a test page for you to try. I'll try to send you the link later |
The linter reloads the current page into an
👍 |
Trying to set up the test page, I realized what the problem is. It's what you had hypothesized at the beginning: the images do not exist in the code but in many cases they are injected by JS: this is the case of lazy images loading created via js libraries or in React The ideal thing would be if the linter could acquire the generated html and not the hard-coded one only. Thank you again for your help |
It already does that, but it only waits until the pages |
if I understand correctly, the script generates an iframe with the page URL and then, once loading is complete, it runs the checks, thus excluding anything loaded asynchronously. But couldn't it be possible to directly use the html code on the page? Would it be possible to use I would be happy to help you (if I'm able..., I haven't seen how the script is built) |
That does not work, as all JavaScript events would get lost, and they are required for most pages as they often react to the window size and potentially affect the size of the images themselfs.
You can find the code responsible for loading the iframe here: respimagelint/src/collector/index.js Lines 28 to 72 in 194f755
There is extra code that waits for all jQuery ajax requests (via |
ok, I'll get a try Thanks |
I ran into this with React too. Maybe a generic way to tell you the page is fully loaded? I tried setting |
I've a tool that generates images dynamically server-side, and they are ignored by the linter.
The src images do not contain the extension (e.g. webp, jpeg, etc.), could this be the problem?
sample url: https://.../34262
Generated images send the appropriate headers and work fine on all browser
Is it possible to make the linter also intercept images of this type?
The text was updated successfully, but these errors were encountered: