feat(pwa): add service-worker + webmanifest for each podcasts to have them install on devices

- configure service-worker using vite-plugin-pwa
- refactor Image entity to generate images of
different types based on size config
- add requirement for webp library for php gd to generate webp
images for instance
- add action to regenerate all instance images for eventual Images config
changes
- enhance google lighthouse metrics for pwa
This commit is contained in:
Yassine Doghri 2021-11-23 11:54:34 +00:00
commit fee2c1c0d0
80 changed files with 14546 additions and 9322 deletions

View file

@ -204,9 +204,9 @@ class EpisodeController extends BaseController
'height' => 144,
'thumbnail_url' => $this->episode->cover->large_url,
'thumbnail_width' => config('Images')
->podcastCoverSizes['large'][0],
->podcastCoverSizes['large']['width'],
'thumbnail_height' => config('Images')
->podcastCoverSizes['large'][1],
->podcastCoverSizes['large']['height'],
]);
}
@ -222,8 +222,8 @@ class EpisodeController extends BaseController
$oembed->addChild('author_name', $this->podcast->title);
$oembed->addChild('author_url', $this->podcast->link);
$oembed->addChild('thumbnail', $this->episode->cover->large_url);
$oembed->addChild('thumbnail_width', (string) config('Images')->podcastCoverSizes['large'][0]);
$oembed->addChild('thumbnail_height', (string) config('Images')->podcastCoverSizes['large'][1]);
$oembed->addChild('thumbnail_width', (string) config('Images')->podcastCoverSizes['large']['width']);
$oembed->addChild('thumbnail_height', (string) config('Images')->podcastCoverSizes['large']['height']);
$oembed->addChild(
'html',
htmlentities(