You are here

function blazy_library_info_alter in Blazy 8

Same name and namespace in other branches
  1. 8.2 blazy.module \blazy_library_info_alter()

Implements hook_library_info_alter().

File

./blazy.module, line 109
Provides basic Blazy integration for lazy loading and multi-serving images.

Code

function blazy_library_info_alter(&$libraries, $extension) {
  if ($extension === 'blazy' && ($path = blazy_libraries_get_path('blazy'))) {
    $libraries['blazy']['js'] = [
      '/' . $path . '/blazy.min.js' => [
        'weight' => -4,
      ],
    ];
  }
}