question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

initscript is executed before images have been loaded

See original GitHub issue

What is says in the title: The function imagesize("image name") returns [NaN, NaN].

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
montagacommented, Feb 11, 2021

Another more user-friendly idea would be that imagesize waits until the image has been loaded. So running imagesize could block the applet, but in most cases the applets still remain fast and with advanced programming using imageready the old behavior could be still used.

0reactions
kortenkampcommented, Feb 11, 2021

We could also allow a parameter lazystart that manages whether the init script will wait for loading images or not

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is it possible to run javascript before images begin loading?
Javascript loading and execution is serialized by the browser (unless you use something like head.js ), but the problem is that the DOM...
Read more >
Javascript wait until all scripts are loaded - Edizioni La Grafica
In plain JS: window. Only when JavaScript is done running all its synchronous code, and is good and ready, will the event loop...
Read more >
Img.on(“load”) executes after the img is loaded but before it ...
I've some images, that I want to load by assigning their “data-src” attribute value to theirs “src” attribute and vertically center them after....
Read more >
How do I know when controls are fully loaded? - Telerik
The startup script is executed long before the images are loaded. This results in the page 'building' up as it loads images for...
Read more >
Document: DOMContentLoaded event - Web APIs | MDN
The DOMContentLoaded event fires when the initial HTML document has been completely loaded and parsed, without waiting for stylesheets, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found