Closed (outdated)
Project:
Touch Icons
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
12 Mar 2011 at 17:36 UTC
Updated:
20 Oct 2025 at 08:16 UTC
Jump to comment: Most recent
Comments
Comment #1
andrewmacpherson commentedHi Chris! Thanks for the feature request.
I had already discovered this, and have been considering it as a feature for the module. There are just a couple of problems which I'm still mulling over:
sizesattribute annoys me, since it isn't valid HTML. It's harmless, but could be a problem for any organisation that requires their web pages to pass W3C validation.#statesfeature of D7 could alleviate this problem.The help text included with the module needs improvement. I should implement hook_help() and reduce the amount of text in the settings form.
Comment #2
andrewmacpherson commentedTags should be comma-separated
Comment #3
andrewmacpherson commentedI found a note about an alternative method using using CSS Media Queries, which looks very interesting. As far as I know, it isn't documented or recommended by Apple, but it avoids the use of the non-standard
sizesattribute.Comment #4
andrewmacpherson commentedThe Apple Docs say the sizes attribute only works for iOS 4.2 and above.
Comment #5
andrewmacpherson commentedMore useful notes:
http://mathiasbynens.be/notes/touch-icons
Apparently the order of the link elements for different sizes is worth considering.
Comment #6
andrewmacpherson commentedI could use use the D7 image styles API to generate different icon sizes. This would allow site admins to upload a large icon, and get it re-sized for each device type. This would reduce complication in the settings form.
Comment #7
andrewmacpherson commentedUpgrading priority to major, since I really want to support the full range of devices.
Postponing it until I've got a stable 7.x-1.0 release out the door. This will likely go into 7.x-2.x development. I'm not inclined to add new features in the D6 branch, as I would rather focus on D7 from now.
Comment #8
andrewmacpherson commentedD7 Image Styles could also be used to generate the precomposed icons, using ANY available image effects. Rounded corners, overlays, backgrounds, or anything effects provided by contrib modules. Imagefield crop might be a cool one to use!
Just upload a single large square image, and get 6 icons out. Simple scale for the three plain icons sizes, or special effects + scale for the precomposed icons.
6 image styles with the correct sizes could be declared by touch_icons.module. These could be over-ridden, or users could create image styles of their own.
Hmmm, lots of things to try...
Comment #10
makangus commentedI just ran into this situation and that's whats keeping me away from using the module. Some people might want the touch icon to be different under different screen resolutions. I think the resizing option is a different issue all together, a different feature request. I think the module does need to provide a way to let a user upload different images for different resolutions.
I am happy to help out with figuring out what's the best way to add the support for touch icons in different sizes, I do want to switch my site back to using the module instead of having a few drupal_add_html_head_link() in my template.php.
Comment #11
Chris CharltonAnything preventing this module from going 1.0-stable? And starting the 2.x branch?
Comment #12
Ignigena commentedThanks for this great module! In an attempt to use this module myself for my own website, I forked the 2.x-dev branch and started working on integrating multi-resolution support.
Here's the URL of the sandbox: http://drupal.org/sandbox/Ignigena/1884316
Still needs some heavy lifting before it's completely ready but here's what I have implemented so far:
I still have to implement the form validation function to check the icon sizes with the required values encoded in the array definition. Also, I'm sure some code could be cleaned up a ton or abstracted some more. I've tried to keep theme settings names the same for easy upgrading but it would probably be good to add an upgrade function. Once I have the code to a point where it's somewhat stable I'll post a patch here.
Hope someone finds this useful!
Comment #13
andrewmacpherson commentedHi Albert,
I'm happy to accept patches for touch_icons. Thanks for getting started with this!
I'll take a detailed look at your code later this week. Here are my initial thoughts.
devicePixelRatiois that it doesn't take into acount the entire screen size of the device. Non-iOS devices have been making use of touch icons for a while, and there's a much greater range of screen sizes and resolutions. An article at QuirksMode goes into some detail about this.The Apple documentation recommends using the
sizesattribute, and the effectiveness has been explored in an article by Mathias Beynens. This is my preferred approach; with more mobile OS platforms on the way (Tizen, Ubuntu, FirefoxOS), device-agnostic code makes more sense to me. The nature of the touch icons use-case means dvices need to cache these icons, so server load isn't a worry to me. (Unless there are some alarming figures I don't know about yet!)#1665754: Add ability to provide a startup image for mobile home screen.
Comment #14
Ignigena commentedAbsolutely! I'm glad to help but also don't want to step on any toes. I'm pretty sure much of my code is still pretty messy and could use some naming consistency. Hopefully I'll have a chance to clean some of it up before you take a look :)
Good points all around. Honestly, I just liked the feeling of a more compact block of code in the header versus separate lines with a separate meta tag different icon size. So, to this extent I've just always used the same JS snippet in all my sites. However, I do see your point of cross-device compatibility and keeping with the Apple documentation so I would agree with you on all of this.
Makes total sense!
Comment #15
ailgm commentedIt's been a while since there was activity on this thread. This would be nice to get done.
Since the status is "Postponed (maintainer needs more info)", I'll ask ... What more information would be helpful?
Comment #16
brightboldAccording to this comment on Stack Exchange, these are the latest Apple standards with iOS 8 and the iPhone 6 Plus:
The standard icon is still 57x57.
Comment #17
Chris CharltonIn addition to the new @3x changes mentioned in comment #16, there's newer ways to have multiple image icons represented in a single tag but I'm not sure if Apple is supporting it... yet. Will check.
Comment #18
truls1502It would be great to add the feature with sizes. Do someone have patch to it?
Comment #19
richardp commentedFor those looking for more flexibility, the "responsive favicons" module can do multiple sizes/devices.
Comment #20
astonvictor commentedD7 reached its EOL back in January 2025, and there is no active release for D7 for this module anymore.
Development or support is not planned for D7. All D7-related issues are marked as outdated in a bunch.