New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Template Manager ico #39861
Comments
|
You need to add We validate the file format and the mime type of the file as part of the security checks. |
|
🤦 i'm blind. sorry. |
|
.ico images are not valid for the Also you shouldn't use .ico for favicons anymore, use PNG: https://caniuse.com/link-icon-png |
|
@dgrammatiko that isnt the point. the conflicting messages is the issue |
|
The green alert is correct because the file was uploaded correctly The error comes from joomla-cms/libraries/src/Image/Image.php Line 620 in 23de0b1
You could try to patch things, probably here (?): joomla-cms/administrator/components/com_templates/src/View/Template/HtmlView.php Line 188 in 23de0b1
Again, the |
|
not interested in debating the value of ico or if they are images or if they should be used. This issue is purely about the two conflicting messages |
This is not an issue. ICO ARE NOT IMAGES (in the sense that jpg, png,avif,webp, gif) both for the browser and the PHP tools (the image class). Adding that extension to the allowed ones and expecting that somehow both PHP and Browsers will actually do something more than an error is delusional... @brianteeman in case I wasn’t clear: you added a non valid image format into the array of valid images and expected somehow to work. Similarly you could add psd or ai and get the same error. If you need to add the ico format support you have to do it as an unknown file (like zip) |
|
that is NOT the issue I am reporting. You should never be able to get both a success and a fail message for the same thing |
Once again: you added a non valid image format into the array of valid images and expected somehow to work, that would never work because neither browsers or PHP GD is not considering .ico files as valid images. |
No. The web is trying to forget this weird format, use PNG or SVG is the best practice for some time now. Of course if you want to support it you could, ie in the browser use canvas to decode that thing and then write your own decoder/encoder for the PHP (since GD and Imagic don't support it). |
|
closing this and will re-open a new issue with a big warning to NOT discuss if an ico is an image or not |
@dgrammatiko You are writing nonsense! imagemagick is supporting ico "convert -list format | grep ICO -> ICO* ICON rw+ Microsoft icon" Nearly all Browsers are supporting ico as icon-image format.
Only GD-Lib does not support the ico format.
Have a look at the link tag. <link rel="icon" href="favicon.ico" />A lot of pagebuilders are using the image folder to select the favicon and all Browsers are still supporting ico as favicon. Since you have referred to caniuse, I will also do so.
Only the manifest icons does not support ico in all cases. "or is simply unknown if it is supported" |
My comment was:
All your other comments are irrelevant |
I did and you know what, it is working. xD |
And so that you can't claim that it only works because it was loaded directly via the file system, here again with an html file, with an img and the favicon. <!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<link rel="icon" href="mrmo_favicon_test.ico" />
<title></title>
</head>
<body>
<header></header>
<main><img src="mrmo_favicon_test.ico"></main>
<footer></footer>
</body>
</html> |
|
@Orgoth probably this is new but personally I'll stick to the SPECS: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#supported_image_formats and not do anything with that legacy proprietary format, the web has moved on... |
|
That is also absolutely right that it must continue or move on. As communicated by me, some page builders, such as Yootheme use the image's folder for the favicons and the ico cannot be uploaded even if the user enables them.
Even in this case, you are talking nonsense. Quote from the Spec you are referring to:
|
|
If you are using tools that are still using Unsubscribing |
|
@dgrammatiko Please do not make false claims without having practically counter-checked that this is indeed the case. Yes lets close this discussion here, we have made our point clear. |







Steps to reproduce the issue
Using the template manager try to upload an *.ico image such as a favicon
It should fail
Go to the template manager options and add ico to the list of alloed image formats
Try again to upload an *.ico image using the template manager
Expected result
File uploaded
Actual result
File Uploaded success message
AND
File not uploaded error message
System information (as much as possible)
Additional comments
The text was updated successfully, but these errors were encountered: