Skip to content

Commit c86e4dc

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 6991905 commit c86e4dc

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
@@ -16,12 +16,12 @@ switch_locale do
1616
json.icons do
1717
json.array!([
1818
{
19-
src: '/icon.png',
19+
src: asset_url('icon.png', skip_pipeline: true),
2020
sizes: '512x512',
2121
type: 'image/png',
2222
},
2323
{
24-
src: '/icon.svg',
24+
src: asset_url('icon.svg', skip_pipeline: true),
2525
sizes: 'any',
2626
type: 'image/svg+xml',
2727
},

0 commit comments

Comments
 (0)