From 9a14b1ff6cbc94b8f1f9aee561166d81d5c19efa Mon Sep 17 00:00:00 2001 From: Joe McGill Date: Thu, 14 Dec 2023 15:41:45 -0600 Subject: [PATCH] Add: Auto Sizes for Lazy-loaded Images This adds a new module that will automatically enhance the `sizes` attribute of lazy-loaded images to support the new `auto` syntax. See: https://github.com/whatwg/html/issues/4654 Fixes: #791. --- modules/images/auto-sizes/hooks.php | 71 +++++++++++++++++++++++++++++ modules/images/auto-sizes/load.php | 18 ++++++++ 2 files changed, 89 insertions(+) create mode 100644 modules/images/auto-sizes/hooks.php create mode 100644 modules/images/auto-sizes/load.php diff --git a/modules/images/auto-sizes/hooks.php b/modules/images/auto-sizes/hooks.php new file mode 100644 index 000000000..3e849323b --- /dev/null +++ b/modules/images/auto-sizes/hooks.php @@ -0,0 +1,71 @@ +