Remove extra `apple-touch-icon` link in head.

Remove extra apple-touch-icon link in head.

The sizes attribute does not make a difference because both
image provided is of the same size.

From ffdacba21961e515ac1bc658d598d497f4c1ac3f Mon Sep 17 00:00:00 2001
From: Guo Xiang Tan <tgx_world@hotmail.com>
Date: Thu, 29 Nov 2018 15:24:52 +0800
Subject: [PATCH] Remove extra `apple-touch-icon` link in head.

The sizes attribute does not make a difference because both
image provided is of the same size.

diff --git a/app/views/layouts/_head.html.erb b/app/views/layouts/_head.html.erb
index ad75304..89933bb 100644
--- a/app/views/layouts/_head.html.erb
+++ b/app/views/layouts/_head.html.erb
@@ -5,10 +5,7 @@
 <%- end %>
 <% site_apple_touch_icon_url = SiteSetting.site_apple_touch_icon_url %>
 <%- if site_apple_touch_icon_url.present? %>
-<link rel="apple-touch-icon" type="image/png" href="<%= site_apple_touch_icon_url %>">
-<%- end %>
-<%- if (site_apple_touch_icon_url != "/images/default-apple-touch-icon.png") && site_apple_touch_icon_url.present? %>
-<link rel="apple-touch-icon" type="image/png" sizes="144x144" href="<%= site_apple_touch_icon_url %>">
+<link rel="apple-touch-icon" type="image/png" href="<%= UrlHelper.absolute(site_apple_touch_icon_url) %>">
 <%- end %>
 <meta name="theme-color" content="#<%= ColorScheme.hex_for_name('header_background', scheme_id) %>">
 <% if mobile_view? %>

GitHub

1 Like

I wonder, is the image always a PNG?

Based on what Iā€™m reading, it seems like it apple expects a PNG.

1 Like