From 7a84b76bb1716b131c35d9569bfcef3b32d73e60 Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 26 Jun 2024 15:44:08 +0200 Subject: [PATCH] Drop favicon.ico generation (#30375) --- app/models/site_upload.rb | 11 ++--------- app/views/layouts/application.html.haml | 2 -- config/imagemagick/policy.xml | 2 +- lib/tasks/branding.rake | 3 --- public/favicon.ico | Bin 15086 -> 0 bytes spec/requests/account_show_page_spec.rb | 2 +- 6 files changed, 4 insertions(+), 16 deletions(-) delete mode 100644 public/favicon.ico diff --git a/app/models/site_upload.rb b/app/models/site_upload.rb index 6431d1007d1..273dd6de9fd 100644 --- a/app/models/site_upload.rb +++ b/app/models/site_upload.rb @@ -31,17 +31,10 @@ class SiteUpload < ApplicationRecord [:"#{size}", { format: 'png', geometry: "#{size}x#{size}#", file_geometry_parser: FastGeometryParser }] end.freeze, - favicon: { - ico: { - format: 'ico', - geometry: '48x48#', - file_geometry_parser: FastGeometryParser, - }.freeze, - }.merge( + favicon: FAVICON_SIZES.to_h do |size| [:"#{size}", { format: 'png', geometry: "#{size}x#{size}#", file_geometry_parser: FastGeometryParser }] - end - ).freeze, + end.freeze, thumbnail: { '@1x': { diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index e7f1a595e53..0c0512e812f 100755 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -11,8 +11,6 @@ - if storage_host? %link{ rel: 'dns-prefetch', href: storage_host }/ - %link{ rel: 'icon', href: favicon_path('ico') || '/favicon.ico', type: 'image/x-icon' }/ - - SiteUpload::FAVICON_SIZES.each do |size| %link{ rel: 'icon', sizes: "#{size}x#{size}", href: favicon_path(size.to_i) || frontend_asset_path("icons/favicon-#{size}x#{size}.png"), type: 'image/png' }/ diff --git a/config/imagemagick/policy.xml b/config/imagemagick/policy.xml index 2730a9f84e3..e2aa202f274 100644 --- a/config/imagemagick/policy.xml +++ b/config/imagemagick/policy.xml @@ -23,5 +23,5 @@ - + diff --git a/lib/tasks/branding.rake b/lib/tasks/branding.rake index 608fb3af9c4..be72454ce29 100644 --- a/lib/tasks/branding.rake +++ b/lib/tasks/branding.rake @@ -42,7 +42,6 @@ namespace :branding do output_dest = Rails.root.join('app', 'javascript', 'icons') rsvg_convert = Terrapin::CommandLine.new('rsvg-convert', '-w :size -h :size --keep-aspect-ratio :input -o :output') - convert = Terrapin::CommandLine.new('convert', ':input :output', environment: { 'MAGICK_CONFIGURE_PATH' => nil }) favicon_sizes = [16, 32, 48] apple_icon_sizes = [57, 60, 72, 76, 114, 120, 144, 152, 167, 180, 1024] @@ -56,8 +55,6 @@ namespace :branding do rsvg_convert.run(size: size, input: favicon_source, output: output_path) end - convert.run(input: favicons, output: Rails.public_path.join('favicon.ico')) - apple_icon_sizes.each do |size| rsvg_convert.run(size: size, input: app_icon_source, output: output_dest.join("apple-touch-icon-#{size}x#{size}.png")) end diff --git a/public/favicon.ico b/public/favicon.ico deleted file mode 100644 index b09a98bb9b0649cb67305b6663bd56b3cfb17222..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15086 zcmdU0d303O8Gn{m+S9sq@gI+sdfIc^b8PjTdaRg0MwkFW3;~?w&Ax;HN^k)eL`<|& z1*?|DswkUO)VePfAuIt!5wnnlY=nf607(d0XL~dAX1;#+P41gFZ{8awAyE3x`Q^L! ze(Sx-yf^RrzA(&X%oyhCs~M!@nE5|snA;eJ88a|7_j_ zWUd7WLMY0(?)eIB(B2&+W{!6?WuVfgpT5rcdXgW5Nvv` zlTXHFLx{0ee-@)$>6qAkW*kas5aj+OT;#?x%!_<3%kR)l!u!t(y#MSd%g{IC*oWwi z!BAg*hyEkHCp}$phi*K?A|0leWbuQ4F<)7cX?(OI)6j{4bWxdUXs(!GyeHXW`YRO~ z##;|hFti|GgxHn7w?xUBiAHyImLY@y6-01-AL2E{N|BLCGI zHm@ej7^%@1K^cZG@xJ`q#E27Tl^Vy@H4_bgNL)SltbVfX7qxd9dk~-uLuIW_clo(3 zjZ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