From 13dfea68b0cf24eb93013e69a0b509ef0a008cb8 Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Wed, 25 Dec 2024 12:24:29 +0100 Subject: [PATCH] Use asset helper for webmanifest icons Specifying a host is optional, since browsers will resolve the path anyway. However, the absolute path entered didn't work with another relative_url_root. We could either fix it by removing the leading / (making the icon relative to the webmanifest) or simply by using an asset helper. --- app/views/pwa/manifest.webmanifest.jbuilder | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/pwa/manifest.webmanifest.jbuilder b/app/views/pwa/manifest.webmanifest.jbuilder index 3579f14e9..c3d450c5e 100644 --- a/app/views/pwa/manifest.webmanifest.jbuilder +++ b/app/views/pwa/manifest.webmanifest.jbuilder @@ -15,12 +15,12 @@ switch_locale do json.icons do json.array!([ { - src: '/icon.png', + src: asset_url('icon.png', skip_pipeline: true), sizes: '512x512', type: 'image/png', }, { - src: '/icon.svg', + src: asset_url('icon.svg', skip_pipeline: true), sizes: 'any', type: 'image/svg+xml', },