Skip to content

Commit 13dfea6

Browse files
committed
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.
1 parent b44996d commit 13dfea6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/views/pwa/manifest.webmanifest.jbuilder

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ switch_locale do
1515
json.icons do
1616
json.array!([
1717
{
18-
src: '/icon.png',
18+
src: asset_url('icon.png', skip_pipeline: true),
1919
sizes: '512x512',
2020
type: 'image/png',
2121
},
2222
{
23-
src: '/icon.svg',
23+
src: asset_url('icon.svg', skip_pipeline: true),
2424
sizes: 'any',
2525
type: 'image/svg+xml',
2626
},

0 commit comments

Comments
 (0)