Lazy load images
Some checks failed
timw4mail/HummingBirdAnimeClient/pipeline/head There was a failure building this commit
Some checks failed
timw4mail/HummingBirdAnimeClient/pipeline/head There was a failure building this commit
This commit is contained in:
parent
392f24d11f
commit
9ecd5df6c7
@ -127,7 +127,7 @@ class RoboFile extends Tasks {
|
|||||||
{
|
{
|
||||||
$files = $this->getAllSourceFiles();
|
$files = $this->getAllSourceFiles();
|
||||||
|
|
||||||
$chunks = array_chunk($files, 12);
|
$chunks = array_chunk($files, (int)shell_exec('getconf _NPROCESSORS_ONLN'));
|
||||||
|
|
||||||
foreach($chunks as $chunk)
|
foreach($chunks as $chunk)
|
||||||
{
|
{
|
||||||
|
@ -2,6 +2,14 @@
|
|||||||
"name": "aviat/hummingbird-anime-client",
|
"name": "aviat/hummingbird-anime-client",
|
||||||
"description": "A self-hosted anime/manga client for Kitsu.",
|
"description": "A self-hosted anime/manga client for Kitsu.",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Timothy J. Warren",
|
||||||
|
"email": "tim@timshomepage.net",
|
||||||
|
"homepage": "https://timshomepage.net",
|
||||||
|
"role": "Developer"
|
||||||
|
}
|
||||||
|
],
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"files": [
|
"files": [
|
||||||
"src/Ion/functions.php",
|
"src/Ion/functions.php",
|
||||||
@ -20,6 +28,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
|
"lock": false,
|
||||||
"platform": {
|
"platform": {
|
||||||
"php": "7.3"
|
"php": "7.3"
|
||||||
}
|
}
|
||||||
|
@ -62,6 +62,9 @@ final class Picture {
|
|||||||
$urlGenerator = $this->container->get('url-generator');
|
$urlGenerator = $this->container->get('url-generator');
|
||||||
$helper = $this->container->get('html-helper');
|
$helper = $this->container->get('html-helper');
|
||||||
|
|
||||||
|
$imgAttrs['loading'] = 'lazy';
|
||||||
|
$picAttrs['loading'] = 'lazy';
|
||||||
|
|
||||||
// If it is a placeholder image, make the
|
// If it is a placeholder image, make the
|
||||||
// fallback a png, not a jpg
|
// fallback a png, not a jpg
|
||||||
if (strpos($uri, 'placeholder') !== FALSE)
|
if (strpos($uri, 'placeholder') !== FALSE)
|
||||||
|
Loading…
Reference in New Issue
Block a user