WordPress.org

Forums

BJ Lazy Load
[resolved] set the threshold (so image are loaded earlier) (8 posts)

  1. lebuttazzoni
    Member
    Posted 2 years ago #

    Does anybody knows how to set the threshold so the image can be loaded earlier. The trick is explain here

    http://www.appelsiini.net/projects/lazyload

    but where to change things in the plugin ????

    http://wordpress.org/plugins/bj-lazy-load/

  2. Bjørn Johansen
    Member
    Plugin Author

    Posted 1 year ago #

    There is currently no option in the plugin for adjusting the threshold. But before a major rewrite, the option existed in a previous version. I will try to get it back soon. It wasn't proritized, as I thought nobody used that :-)

    BTW: The project on that link is totally unrelated

  3. lebuttazzoni
    Member
    Posted 1 year ago #

    Thanks for your response.

    I am a llittle bit into php/javascript so if there a few line to add, I could do it...

    If you have a link I follow it, if I have to wait for the nexte version, I will wait

  4. Bjørn Johansen
    Member
    Plugin Author

    Posted 1 year ago #

    Edit line 8 in js/bj-lazy-load.js where it says "distance: 200". The number is the threshold in pixels.
    Then minify sonar.js and bj-lazy-load.js and combine them both into combined.min.js.

    This is a "hacky" way of doing it, and remember that the change will be overwritten on the next upgrade.

    (You can of course edit combined.min.js directly, but it might be harder to find the correct position of the code to edit.)

  5. eldenroot
    Member
    Posted 1 year ago #

    Thank you, I would like to see it in next update ;)

  6. Bjørn Johansen
    Member
    Plugin Author

    Posted 1 year ago #

    I just released version 0.6.10 where you can define your own threshold on the options page. Default is still 200.

  7. lebuttazzoni
    Member
    Posted 1 year ago #

    Hi Bjorn

    That's the best news of the day (other are really not that good)

    I will update

    Thanks a lot

  8. lebuttazzoni
    Member
    Posted 1 year ago #

    IT WORKS GREAT

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • BJ Lazy Load
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.