• Resolved hlanggo

    (@hlanggo)


    Really (really) appreciate that the scripts can be assigned to the footer.

    It would be really helpful if this plugin only loads its files when there are images or image links on the post or page.

    It does add only 1kb to 12kb and 3 requests, but it’s just better and cleaner if it does not load where it’s not needed.

    Akismet for example only loads its script when comments are allowed.

    https://wordpress.org/plugins/responsive-lightbox/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author dFactory

    (@dfactory)

    It’s (almost) impossible.

    There’s no simple way to detect if a page contains images or not. Akismet example is misleading, cos detecting the comment, shortcode or something else is something different than detecting an image (in any area of the page it may reside).

    Commenting is a functionality – it’s existence on page can be detected before the page is rendered, while images are part of the content.

    Thread Starter hlanggo

    (@hlanggo)

    You said it was (almost) impossible. But you did it in 1.5.6 . 🙂

    Plugin Author dFactory

    (@dfactory)

    Yes 🙂
    But to the extent it’s possible – post content.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Feature Request – Do not load where not needed’ is closed to new replies.