1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-14 02:24:08 +02:00

toImage() Added support for native image lazy-loading. See https://addyosmani.com/blog/lazy-loading/ for more info.

This commit is contained in:
Cameron
2020-04-17 12:02:10 -07:00
parent a5a4b900a4
commit 6677e75fcb
2 changed files with 8 additions and 3 deletions

View File

@@ -822,6 +822,10 @@ TMP;
$override = array('w'=>0, 'h'=>0); // display image without resizing
$result3 = $this->tp->toImage($src, $override);
$this->assertStringContainsString('Fbutterfly.jpg&w=0&h=0', $result3); // src
$result4 = $this->tp->toImage($src, ['loading'=>'lazy']);
$this->assertStringContainsString('loading="lazy"', $result4); // src
}
public function testThumbSrcSet()