Skip to content

Slow loading if no images found. #150

Description

@lcdsantos

When the page has no images, the plugin wait for the maxTime to complete, instead of just completing right away.

Example:
http://jsbin.com/dureti/edit?html,output - Contains 1 image, loads pretty fast.
http://jsbin.com/henaba/edit?html,output - Has no images, takes really long time to complete.

What if we add a check after getImageSrcs function on

this.sources = this.getImageSrcs(element);

if (this.sources.length === 0) {
  this.done === true;
  this.updateProgress();
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions