link rel="apple-touch-icon" inserted when it shouldn't be

JackieChun

Well-known member
Affected version
2.3.2
If you upload the open graph image via the admin panel but intentionally don't upload the "icon" or "large icon" images (these should be named more accurately btw), XenForo automatically uses your og image as apple-touch-icon. Here's the output I'm seeing:

Code:
    <link rel="apple-touch-icon" href="/img/og.webp" />

This is unwanted behavior because the open graph image specs (and purpose) are totally different from Apple or Android icons. Og uses the 1.91:1 ratio while the Android/Apple are square. If you use Google's best practices, which recommends listing all your Android icons in a separate web manifest file and a separate icon for Apple devices, XenForo will override your choices by creating an icon from your OG image instead.

Please make a note for 2.3.4
 
<link rel="apple-touch-icon" href="touch-icon-iphone.png">
<link rel="apple-touch-icon" sizes="152x152" href="touch-icon-ipad.png">
<link rel="apple-touch-icon" sizes="180x180" href="touch-icon-iphone-retina.png">
<link rel="apple-touch-icon" sizes="167x167" href="touch-icon-ipad-retina.png">
 
Here’s a separate but related issue:

XenForo currently uses the OG image as the Schema.org logo in thread view. This is a misapplication of metadata because the OG image and Schema logo serve distinct purposes. The Schema logo represents the official branding in structured data, while the OG image is intended for social sharing. Aside from this semantic mismatch, the technical requirements for the two images (i.e. aspect ratio, size, and file format) are also different. It also creates a conflict for organization data if you've already set it according to best practices in the page_container template.

For example, here’s the output being generated in thread view:

Code:
"publisher": {
    "@type": "Organization",
    "name": "Board name",
    "description": "Board description",
    "url": "https://www.example.com",
    "logo": "/img/og.png"
}

Another critical error is that Schema data should not use relative paths for media, again per best practices.

My proposed solution is to stop forcing the reuse of media across site icons/favicons, open graph, and Schema. They are all different things and using them interchangeably opens a can of worms in SEO and other areas.
 
Back
Top Bottom