3 Provides integration with bLazy to lazy load and multi-serve images to save
4 bandwidth and server requests. The user will have faster load times and save
5 data usage if they don't browse the whole page.
10 o Supports core Responsive image.
11 o Supports Colorbox/Photobox/ PhotoSwipe, also multimedia lightboxes.
12 o Multi-serving images for configurable breakpoints, almost similar to core
13 Responsive image, only less complex.
14 o CSS background lazyloading, see Mason, GridStack, and Slick carousel.
15 o IFRAME urls via custom coded, Blazy Video, Blazy Image with Media entity via
16 Video Embed Media, or see Slick Video, Slick Media.
17 o Delay loading for below-fold images until 100px (configurable) before they are
19 o A simple effortless CSS loading indicator.
20 o It doesn't take over all images, so it can be enabled as needed via Blazy
21 formatter, or its supporting modules.
25 o Views fields for File ER and Media Entity integration, see Slick Browser.
26 o Views style plugin Blazy Grid.
27 o Field formatters: Blazy, Blazy Video, and Blazy Image with Media integration.
32 o Download bLazy from https://github.com/dinbror/blazy
33 o Extract it as is, rename "blazy-master" to "blazy", so the assets are at:
35 /libraries/blazy/blazy.min.js
39 Install the module as usual, more info can be found on:
40 http://drupal.org/documentation/install/modules-themes/modules-7
44 Be sure to enable Blazy UI which can be uninstalled at production later.
45 o Go to Manage display page, e.g.:
46 admin/structure/types/manage/page/display
48 o Find "Blazy" formatter under "Manage display".
50 o Go to "admin/config/media/blazy" to manage few global options, including
51 enabling support for lazyloading core Responsive image.
54 MODULES THAT INTEGRATE WITH OR REQUIRE BLAZY
59 o Slick (D8 only by now)
60 o Slick Views (D8 only by now)
65 Most duplication efforts from the above modules will be merged into
66 \Drupal\blazy\Dejavu namespace.
70 https://www.drupal.org/project/lazyload
71 https://www.drupal.org/project/lazyloader
75 Resizing is not supported. Just reload the page.
78 Blazy provides two simple Views fields for File ER, and Media Entity.
80 When using Blazy formatter within Views, check "Use field template" under
81 "Style settings", if trouble with Blazy Formatter as stand alone Views output.
82 On the contrary, uncheck "Use field template", when Blazy formatter
83 is embedded inside another module such as GridStack so to pass the renderable
85 This is a Views common gotcha with field formatter, so be aware of it.
86 This confusion should be solved later when Blazy formatter is aware of Views.
89 If the images appear to be shrinked within a floating container, add
90 some expected width or min-width to the parent container via CSS accordingly.
91 Non-floating image parent containers aren't affected.
94 Add a min-height CSS to individual element to avoid layout reflow if not using
95 Aspect ratio or when Aspect ratio is not supported such as with Responsive
96 image. Otherwise some collapsed images containers will defeat the purpose of
97 lazyloading. When using CSS background, the container may also be collapsed.
98 Both layout reflow and lazyloading delay issues are actually taken care of
99 if Aspect ratio option is enabled in the first place.
101 Adjust, and override blazy CSS files accordingly.
105 [x] Adds a basic configuration to load the library, probably an image formatter.
107 [x] Media entity image/video, and Video embed field lazyloading, if any.
109 Added both simple Blazy Media formatter and Views field Media Entity.
110 [x] Makes a solid lazyloading solution for IMG, DIV, IFRAME tags.
112 Added IFRAME (Blazy Video), apart from existing IMG/ DIV (CSS background).
115 CURRENT DEVELOPMENT STATUS
116 A full release should be reasonable after proper feedbacks from the community,
117 some code cleanup, and optimization where needed. Patches are very much welcome.
119 Alpha and Beta releases are for developers only. Be aware of possible breakage.
123 Visit any of the following URLs when updating Blazy, or its related modules.
124 Please ignore any documentation if already aware of Drupal site building. This
125 is for the sake of completed documentation for those who may need it.
127 1. /admin/config/development/performance
128 Unless an update is required, clearing cache should fix most issues.
130 o Hit "Clear all caches" button once the new Blazy in place.
131 o Regenerate CSS and JS as the latest fixes may contain changes to the assets.
132 Ignore below if you are aware, and found no asset changes from commits.
133 Normally clearing cache suffices when no asset changes are found.
134 - Uncheck CSS and JS aggregation options under Bandwidth optimization.
136 - [Ignorable] See one of Blazy related pages if display is expected.
137 - [Ignorable] Only clear cache if needed.
138 - Check both options again.
140 - [Ignorable] Press F5, or CMD/ CTRL + R to refresh browser cache if needed.
142 2. /admin/reports/status
143 Check for any pending update, and run /update.php from the brower address bar.
145 3. If Twig templates are customized, compare against the latest.
149 See blazy.api.php for details.
152 o If breakpoints provided with tons of images, using image styles with ANY crop
153 is recommended to avoid image dimension calculation with individual images.
154 The image dimensions will be set once, and inherited by all images as long as
155 they contain word crop. If using scaled image styles, regular calculation
159 AUTHOR/MAINTAINER/CREDITS
163 https://www.drupal.org/node/2663268/committers
167 See the project page on drupal.org: http://drupal.org/project/blazy.
169 See the bLazy docs at:
170 o https://github.com/dinbror/blazy
171 o http://dinbror.dk/blazy/