{"id":705,"date":"2011-12-06T10:44:45","date_gmt":"2011-12-06T10:44:45","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/bj-lazy-load\/"},"modified":"2017-08-09T12:06:05","modified_gmt":"2017-08-09T12:06:05","slug":"bj-lazy-load","status":"publish","type":"plugin","link":"https:\/\/kn.wordpress.org\/plugins\/bj-lazy-load\/","author":4136995,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0.9","stable_tag":"trunk","tested":"4.9.29","requires":"3.5","requires_php":"","requires_plugins":"","header_name":"BJ Lazy Load","header_author":"Bj\u00f8rn Johansen, Aron Tornberg, angrycreative","header_description":"","assets_banners_color":"9084ba","last_updated":"2017-11-28 06:25:23","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/www.kiva.org\/","header_plugin_uri":"https:\/\/wordpress.org\/plugins\/bj-lazy-load\/","header_author_uri":"https:\/\/angrycreative.se\/","rating":4.2,"author_block_rating":0,"active_installs":20000,"downloads":851777,"num_ratings":90,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"0.7.5":"<p>Also applies to text widgets<\/p>","0.7.2":"<p>Improved minification compability<\/p>","0.6.10":"<p>Works with Opera Mini<\/p>","0.6.9":"<p>Bugfix release<\/p>","0.6.8":"<p>Bugfix: Works with SCRIPT_DEBUG<\/p>","0.6.7":"<p>Faster loading and bugfix<\/p>","0.6.6":"<p>MobilePress compatible<\/p>","0.6.5":"<p>Improved compability with Gravity Forms<\/p>","0.6.4":"<p>Disable when viewing printable page from WP-Print<\/p>","0.6.0":"<p>Image size adaption. Infinite scroll &amp; WPTouch fixes.<\/p>","0.5.4":"<p>Custom placeholder. Skip selected images.<\/p>","0.5.2":"<p>Added fadeIn effect<\/p>","0.5.0":"<p>Lazy load images and iframes. Complete rewrite.<\/p>","0.4.0":"<p>New JAIL version.<\/p>","0.3.2":"<p>Lazy load any image in your theme. Load in head.<\/p>","0.3.1":"<p>Lazy load any image in your theme. Load in head.<\/p>","0.3.0":"<p>Lazy load any image in your theme<\/p>","0.2.5":"<p>Now works with Unicode filenames<\/p>","0.2.4":"<p>Better localization<\/p>","0.2.3":"<p>Improved image replacement<\/p>","0.2.2":"<p>More options and improved non-JS display.<\/p>","0.2.1":"<p>More options and faster loading.<\/p>","0.2":"<p>Lazy load post thumbnails too and stays out of your feeds.<\/p>"},"ratings":{"1":13,"2":4,"3":3,"4":4,"5":65},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":"1007134","resolution":"128x128","location":"assets"},"icon-256x256.png":{"filename":"icon-256x256.png","revision":"1007134","resolution":"256x256","location":"assets"}},"assets_banners":{"banner-772x250.jpg":{"filename":"banner-772x250.jpg","revision":"1007134","resolution":"772x250","location":"assets"}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1","0.2","0.2.1","0.2.2","0.2.3","0.2.4","0.2.5","0.3.0","0.3.1","0.3.2","0.3.3","0.4.0","0.5.0","0.5.1","0.5.2","0.5.4","0.6.0","0.6.1","0.6.10","0.6.2","0.6.3","0.6.4","0.6.5","0.6.6","0.6.7","0.6.8","0.6.9","0.7.0","0.7.1","0.7.2","0.7.3","0.7.5","0.8","1.0","1.0.1","1.0.2","1.0.3","1.0.4","1.0.5","1.0.6","1.0.7"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[12722,163,229,1464,1452],"plugin_category":[50,52,59],"plugin_contributors":[79107,127381,78432],"plugin_business_model":[],"class_list":["post-705","plugin","type-plugin","status-publish","hentry","plugin_tags-iframes","plugin_tags-images","plugin_tags-javascript","plugin_tags-lazy-loading","plugin_tags-optimize","plugin_category-media","plugin_category-performance","plugin_category-utilities-and-tools","plugin_contributors-angrycreative","plugin_contributors-arontornberg","plugin_contributors-bjornjohansen","plugin_committers-angrycreative","plugin_committers-arontornberg","plugin_committers-bjorngus","plugin_committers-bjornjohansen"],"banners":{"banner":"https:\/\/ps.w.org\/bj-lazy-load\/assets\/banner-772x250.jpg?rev=1007134","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/bj-lazy-load\/assets\/icon-128x128.png?rev=1007134","icon_2x":"https:\/\/ps.w.org\/bj-lazy-load\/assets\/icon-256x256.png?rev=1007134","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Lazy loading makes your site load faster and saves bandwidth.<\/p>\n\n<p>This plugin replaces all your post images, post thumbnails, gravatar images and content iframes with a placeholder and loads the content as it gets close to enter the browser window when the visitor scrolls the page. Also works with text widgets.<\/p>\n\n<p>Since it works with iframes, it also covers embedded videoes from YouTube, Vimeo etc.<\/p>\n\n<p>You can also lazy load other images and iframes in your theme, by using a simple filter.<\/p>\n\n<p>Non-javascript visitors gets the original element in noscript.<\/p>\n\n<p>Compatible with the <a href=\"https:\/\/wordpress.org\/plugins\/ricg-responsive-images\/\">RICG Responsive Images<\/a> plugin for responsive images.<\/p>\n\n<p>Please let me know if you have any issues. Fastest way to get a response is by Twitter: https:\/\/twitter.com\/bjornjohansen<\/p>\n\n<h4>Translations<\/h4>\n\n<ul>\n<li>Russian (ru_RU) by Elvisrk<\/li>\n<li>Hebrew (he_IL) by Imri Sagive<\/li>\n<li>Polish (pl_PL) by Maciej Gryniuk<\/li>\n<li>Norwegian Bokm\u00e5l (nb_NO) by Bj\u00f8rn Johansen<\/li>\n<\/ul>\n\n<p><a href=\"https:\/\/github.com\/bjornjohansen\/bj-lazy-load\">Development happens at GitHub<\/a>. Pull requests are very welcome.<\/p>\n\n<h3>Optional usage<\/h3>\n\n<p>If you have images output in custom templates or want to lazy load other images in your theme, you may pass the HTML through a filter:<\/p>\n\n<pre><code>&lt;?php\n$img_html = '&lt;img src=\"myimage.jpg\" alt=\"\"&gt;';\n$img_html = apply_filters( 'bj_lazy_load_html', $img_html );\necho $img_html;\n?&gt;\n<\/code><\/pre>\n\n<p>Note for developers: The filter has a priority of 10.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Download and unzip plugin<\/li>\n<li>Upload the 'bj-lazy-load' folder to the '\/wp-content\/plugins\/' directory,<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>Installation Instructions<\/dt>\n<dd><ol>\n<li>Download and unzip plugin<\/li>\n<li>Upload the 'bj-lazy-load' folder to the '\/wp-content\/plugins\/' directory,<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress.<\/li>\n<\/ol><\/dd>\n<dt>Whoa, this plugin is using JavaScript. What about visitors without JS?<\/dt>\n<dd><p>No worries. They get the original element in a noscript element. No Lazy Loading for them, though.<\/p><\/dd>\n<dt>I'm using a CDN. Will this plugin interfere?<\/dt>\n<dd><p>Lazy loading works just fine. The images will still load from your CDN.<\/p><\/dd>\n<dt>How can I verify that the plugin is working?<\/dt>\n<dd><p>Check your HTML source or see the magic at work in Web Inspector, FireBug or similar.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>Version 1.0.9<\/h4>\n\n<ul>\n<li>Do not generate tiny image size if unless low-res preview image is used<\/li>\n<li>Default placeholder image transparency fix<\/li>\n<li>Lazy load image sizes attribute to avoid w3c validation error<\/li>\n<li>Change activation order of src and srcset to avoid loading both original and responsive version of image (by Lucian Florian)<\/li>\n<\/ul>\n\n<h4>Version 1.0.8<\/h4>\n\n<ul>\n<li>Skip classes regex fix<\/li>\n<li>Amp compatibility (by mustafauysal)<\/li>\n<\/ul>\n\n<h4>Version 1.0.7<\/h4>\n\n<ul>\n<li>Update sponsored by Bonnier Tidskrifter<\/li>\n<li>Fixed issue with srcset not lazy loading (by krispy1298)<\/li>\n<li>Compatibility with BadgeOS plugin (by rohitmanglik)<\/li>\n<li>WP's theme style for submit button. (by odie2)<\/li>\n<li>Images will now get the lazy-loaded class onload<\/li>\n<li>Added optional rudimentary LQIP solution<\/li>\n<li>Added working regex for selecting elements to skip<\/li>\n<\/ul>\n\n<h4>Version 1.0.6<\/h4>\n\n<ul>\n<li>Fixed bug when multiple iframes was on the same line of HTML code<\/li>\n<\/ul>\n\n<h4>Version 1.0.5<\/h4>\n\n<ul>\n<li>Added Polish language (by Maciej Gryniuk).<\/li>\n<li>Remove leftover console.log() from debugging -- oh, crap ... I know :-(<\/li>\n<\/ul>\n\n<h4>Version 1.0.4<\/h4>\n\n<ul>\n<li>We do not touch the feeds<\/li>\n<\/ul>\n\n<h4>Version 1.0.3<\/h4>\n\n<ul>\n<li>Fixed issue where some images wouldn\u2019t be loaded on load under certain conditions.<\/li>\n<li>Small performance improvement<\/li>\n<\/ul>\n\n<h4>Version 1.0.2<\/h4>\n\n<ul>\n<li>PHP 5.2 compatibility again<\/li>\n<\/ul>\n\n<h4>Version 1.0.1<\/h4>\n\n<ul>\n<li>Fixes issue with missing placeholder<\/li>\n<\/ul>\n\n<h4>Version 1.0<\/h4>\n\n<ul>\n<li>Internal rewrite. Code cleanup.<\/li>\n<li>Supports 3rd party filters<\/li>\n<li>Supports most infinite scroll (or content lazy loading) plugins (all that triggers post-load)<\/li>\n<li>No more TimThumb<\/li>\n<li>No more dependant on 3rd party JS, not even jQuery<\/li>\n<li>Removed custom responsice\/hidpi image handling in favour of compatibility with the RICG Responsive Images plugin<\/li>\n<li>Added translations to Hebrew (he_IL) by Imri Sagive<\/li>\n<\/ul>\n\n<h4>Version 0.7.5<\/h4>\n\n<ul>\n<li>Also applies to text widgets (Thanks to Sigur\u00f0ur Gu\u00f0brandsson)<\/li>\n<\/ul>\n\n<h4>Version 0.7.4<\/h4>\n\n<ul>\n<li>Skips lazy loading of data-URIs<\/li>\n<\/ul>\n\n<h4>Version 0.7.3<\/h4>\n\n<ul>\n<li>Works with newlines in the HTML string for the IMG element<\/li>\n<\/ul>\n\n<h4>Version 0.7.2<\/h4>\n\n<ul>\n<li>Re-minified the combined js file for better compability with faulty minifiers<\/li>\n<\/ul>\n\n<h4>Version 0.7.1<\/h4>\n\n<ul>\n<li>Proper encoding of non-ASCII characters in filenames when using responsive or hiDPI images (thanks @testsiteoop)<\/li>\n<\/ul>\n\n<h4>Version 0.7.0<\/h4>\n\n<ul>\n<li>Added meta box to all public post types to exclude BJ Lazy Load for individual posts\/pages<\/li>\n<li>Placeholder image is replaced with a really short data-uri (thanks @jruizcantero)<\/li>\n<li>Added a proper WordPress filter method for arbitrary HTML filtering with: apply_filters( 'bj_lazy_load_html', $html )<\/li>\n<li>Updated scbFramework to release 58 (no more strict warnings in admin)<\/li>\n<li>Updated jQuery.sonar to latest version (as of 2013-11-13)<\/li>\n<li>Added POT file (Go translate!)<\/li>\n<li>Added translation to Norwegian Bokm\u00e5l (nb_NO)<\/li>\n<li>Added translation to Russian (ru_RU) by Elvisrk<\/li>\n<\/ul>\n\n<h4>Version 0.6.10<\/h4>\n\n<ul>\n<li>Responsive and HiDPI images works with MultiSite subfolders<\/li>\n<li>Lazy loading is disabled on Opera Mini<\/li>\n<li>Removed leftin print_filters_for() function (sry)<\/li>\n<li>User definable threshold<\/li>\n<\/ul>\n\n<h4>Version 0.6.9<\/h4>\n\n<ul>\n<li>Bugfix: Single quotes for the class attribute is now handled (thanks @kReEsTaL)<\/li>\n<li>Bugfix: Removed strict error notice (thanks syndrael)<\/li>\n<\/ul>\n\n<h4>Version 0.6.8<\/h4>\n\n<ul>\n<li>Bugfix: sonar.js wouldn't load properly when SCRIPT_DEBUG was set to true (thanks @techawakening)<\/li>\n<\/ul>\n\n<h4>Version 0.6.7<\/h4>\n\n<ul>\n<li>Combined JS files for faster loading<\/li>\n<li>Bugfix for when viewport is resized \u2013 now triggering scroll event (thanks @kReEsTaL)<\/li>\n<\/ul>\n\n<h4>Version 0.6.6<\/h4>\n\n<ul>\n<li>Option to disable BJ Lazy Load for MobilePress<\/li>\n<\/ul>\n\n<h4>Version 0.6.5<\/h4>\n\n<ul>\n<li>Iframe lazy loading is now compatible with Gravity Forms' ajax forms.<\/li>\n<\/ul>\n\n<h4>Version 0.6.4<\/h4>\n\n<ul>\n<li>Disable when viewing printable page from WP-Print<\/li>\n<\/ul>\n\n<h4>Version 0.6.3<\/h4>\n\n<ul>\n<li>Detects WPTouch Pro as well<\/li>\n<\/ul>\n\n<h4>Version 0.6.2<\/h4>\n\n<ul>\n<li>Bugfix: Remove notice of undefined constant when SCRIPT_DEBUG isn't defined<\/li>\n<\/ul>\n\n<h4>Version 0.6.1<\/h4>\n\n<ul>\n<li>Bugfix: The infinite_scroll option wasn't initialized<\/li>\n<\/ul>\n\n<h4>Version 0.6.0<\/h4>\n\n<ul>\n<li>Optionally serving size optimized images for responsive design\/adaptive layout<\/li>\n<li>Optionally serving hiDPI images (retina support)<\/li>\n<li>Option to disable BJ Lazy Load for WPTouch<\/li>\n<li>Fixed issue with infinite scroll (must be enabled on options screen)<\/li>\n<li>Upgraded jQuery.sonar to latest version<\/li>\n<\/ul>\n\n<h4>Version 0.5.4<\/h4>\n\n<ul>\n<li>Possible to skip lazy loading of certain images with specified classnames<\/li>\n<li>Made the placeholder image override an option setting in wp-admin<\/li>\n<\/ul>\n\n<h4>Version 0.5.3<\/h4>\n\n<ul>\n<li>Added filter: bj_lazy_load_placeholder_url - override placeholder image (should be an option setting in the future)<\/li>\n<\/ul>\n\n<h4>Version 0.5.2<\/h4>\n\n<ul>\n<li>Added the fadeIn effect<\/li>\n<\/ul>\n\n<h4>Version 0.5.1<\/h4>\n\n<ul>\n<li>Lowered jQuery version dependency<\/li>\n<li>New options: More granular control on what content to lazy load<\/li>\n<\/ul>\n\n<h4>Version 0.5.0<\/h4>\n\n<ul>\n<li>Complete rewrite<\/li>\n<li>Replaced JAIL with jQuery.sonar to accomodate for iframe lazy loading<\/li>\n<li>Added lazy loading for iframes<\/li>\n<li>The manual filter code now works as it should, lazy loading all images instead of just the first.<\/li>\n<\/ul>\n\n<h4>Version 0.4.0<\/h4>\n\n<ul>\n<li>Upgraded JAIL to version 0.9.9, fixing some bugs. Note: data-href is now renamed data-src.<\/li>\n<\/ul>\n\n<h4>Version 0.3.3<\/h4>\n\n<ul>\n<li>Replaced an anonymous function call causing error in PHP &lt; 5.3<\/li>\n<\/ul>\n\n<h4>Version 0.3.2<\/h4>\n\n<ul>\n<li>The wp_head caller selector was added to the option page<\/li>\n<\/ul>\n\n<h4>Version 0.3.1<\/h4>\n\n<ul>\n<li>Also with d.sturm's fix (thanks)<\/li>\n<\/ul>\n\n<h4>Version 0.3.0<\/h4>\n\n<ul>\n<li>Added BJLL::filter() so you can lazy load any images in your theme<\/li>\n<li>Added the option to load in wp_head() instead (suboptimal, but some themes actually don't call wp_footer())<\/li>\n<li>Correctly removed the lazy loader from feeds<\/li>\n<\/ul>\n\n<h4>Version 0.2.5<\/h4>\n\n<ul>\n<li>Fixes Unicode-issue with filenames<\/li>\n<\/ul>\n\n<h4>Version 0.2.4<\/h4>\n\n<ul>\n<li>Now (more) compliant to the WP coding style guidelines.<\/li>\n<li>All strings localized<\/li>\n<li>Translations get loaded<\/li>\n<li>POT file included (send me your translations)<\/li>\n<li>Norwegian translation included<\/li>\n<\/ul>\n\n<h4>Version 0.2.3<\/h4>\n\n<ul>\n<li>Now using DOMDocument for better HTML parsing. Old regexp parsing as fallback if DOMDocument is not available.<\/li>\n<\/ul>\n\n<h4>Version 0.2.2<\/h4>\n\n<ul>\n<li>Added CSS. No longer need for hiding .no-js .lazy<\/li>\n<li>Added options whether to include JS and CSS or not<\/li>\n<\/ul>\n\n<h4>Version 0.2.1<\/h4>\n\n<ul>\n<li>Added options: Timeout, effect, speed, event, offset, ignoreHiddenImages<\/li>\n<li>Combining the two JS files for faster loading<\/li>\n<li>Renamed the plugin file from bj-lazyload.php to bj-lazy-load.php to better fit with the plugin name<\/li>\n<\/ul>\n\n<h4>Version 0.2<\/h4>\n\n<ul>\n<li>Added options panel in admin<\/li>\n<li>Added option to lazy load post thumbnails<\/li>\n<li>Skipped the lazy loading in feeds<\/li>\n<\/ul>\n\n<h4>Version 0.1<\/h4>\n\n<ul>\n<li>Released 2011-12-05<\/li>\n<li>It works (or at least it does for me)<\/li>\n<\/ul>","raw_excerpt":"Lazy loading for images and iframes makes your site load faster and saves bandwidth. Uses no external JS libraries and degrades gracefully for non-js  &hellip;","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/kn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/705","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/kn.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/kn.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=705"}],"author":[{"embeddable":true,"href":"https:\/\/kn.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/bjornjohansen"}],"wp:attachment":[{"href":"https:\/\/kn.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=705"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/kn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=705"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/kn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=705"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/kn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=705"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/kn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=705"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/kn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=705"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}