Skip to content

Commit

Permalink
Use asset helper for webmanifest icons
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
MrSerth committed Dec 26, 2024
1 parent b44996d commit 13dfea6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/views/pwa/manifest.webmanifest.jbuilder
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
Expand Down

0 comments on commit 13dfea6

Please sign in to comment.