PHPackages                             blackbird/external-resources-loader - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. blackbird/external-resources-loader

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

blackbird/external-resources-loader
===================================

Easily lazy load scripts and styles by url

1.0.6(1y ago)623.5k—2.3%4MITHTMLPHP &gt;=7.4.0

Since Jan 2Pushed 1y ago1 watchersCompare

[ Source](https://github.com/blackbird-agency/external-resources-loader)[ Packagist](https://packagist.org/packages/blackbird/external-resources-loader)[ RSS](/packages/blackbird-external-resources-loader/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (1)Versions (8)Used By (4)

External resources loader [![Latest Stable Version](https://camo.githubusercontent.com/7f4305cf89ec6540ba0e466fbfbf135b278ac27b9dfa3dc81801977cc538dc23/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d312e302e332d70696e6b)](https://packagist.org/packages/blackbird/external-resources-loader) [![License: MIT](https://camo.githubusercontent.com/8cd20457e8f9c31f378b18f54e3388e4447c6951b4f750604634223bc5d59aee/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f626c61636b626972642d6167656e63792f65787465726e616c2d7265736f75726365732d6c6f616465722e737667)](./LICENSE)
=======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#external-resources-loader---)

This tiny Magento 2 module will allow you to easily lazy load scripts and styles by url.

Installation
------------

[](#installation)

```
composer require blackbird/external-resources-loader
```

```
php bin/magento setup:upgrade
```

Usage
-----

[](#usage)

### Load script :

[](#load-script-)

```
blackbird.loadExternalResource('https://cdn.jsdelivr.net/npm/@splidejs/splide@4.1.4/dist/js/splide.min.js')
	.then(() => /* code which is executed after the lib has loaded */)
```

### Load style :

[](#load-style-)

```
blackbird.loadExternalResource('https://cdn.jsdelivr.net/npm/@splidejs/splide@4.1.4/dist/css/splide.min.css')
	.then(() => /* code which is executed after the style has loaded */)
```

### Load multiple related scripts and styles :

[](#load-multiple-related-scripts-and-styles-)

```
Promise.all([
    blackbird.loadExternalResource('https://cdn.jsdelivr.net/npm/@splidejs/splide@4.1.4/dist/js/splide.min.js'),
    blackbird.loadExternalResource('https://cdn.jsdelivr.net/npm/@splidejs/splide@4.1.4/dist/css/splide.min.css')
]).then(() => /* code which is executed after the style and the lib has loaded */)
```

### Troubleshooting

[](#troubleshooting)

The `loadExternalResource` method will load a script or a style depending on the url extension. If the url doesn't end by `.js` or `.css`, you could lazy load resource using one of these 2 methods :

- `loadExternalScript` : load resource from a url that provides javascript content
- `loadExternalStyle` : load resource from a url that provides css content

For instance :

```
blackbird.loadExternalScript("")
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 57.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~30 days

Recently: every ~22 days

Total

7

Last Release

686d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/12445118?v=4)[anthony-blackbird](/maintainers/anthony-blackbird)[@anthony-blackbird](https://github.com/anthony-blackbird)

---

Top Contributors

[![cg-blackbird](https://avatars.githubusercontent.com/u/151512744?v=4)](https://github.com/cg-blackbird "cg-blackbird (4 commits)")[![matthieu-blackbird](https://avatars.githubusercontent.com/u/112162474?v=4)](https://github.com/matthieu-blackbird "matthieu-blackbird (3 commits)")

### Embed Badge

![Health badge](/badges/blackbird-external-resources-loader/health.svg)

```
[![Health](https://phpackages.com/badges/blackbird-external-resources-loader/health.svg)](https://phpackages.com/packages/blackbird-external-resources-loader)
```

###  Alternatives

[yireo/magento2-webp2

Magento 2 module to add WebP support to the Magento frontend

2091.2M7](/packages/yireo-magento2-webp2)[tig/postnl-magento2

TIG Magento 2 PostNL extension

58544.2k4](/packages/tig-postnl-magento2)[lillik/magento2-price-decimal

Magento 2 Price Decimal Precision

111147.5k](/packages/lillik-magento2-price-decimal)[nosto/module-nostotagging

Increase your conversion rate and average order value by delivering your customers personalized product recommendations throughout their shopping journey.

27659.1k4](/packages/nosto-module-nostotagging)[magepal/magento2-customeraccountlinksmanager

Customer Account Links Manager for Magento2 allows you to quickly and easily remove unwanted links from customer account dashboard

4084.9k](/packages/magepal-magento2-customeraccountlinksmanager)[doofinder/doofinder-magento2

Doofinder module for Magento 2

13204.0k1](/packages/doofinder-doofinder-magento2)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
