[wp-trac] [WordPress Trac] #31352: Media icons are not retina friendly
WordPress Trac
noreply at wordpress.org
Sun Feb 18 19:05:02 UTC 2024
#31352: Media icons are not retina friendly
-------------------------------------------------+-------------------------
Reporter: iseulde | Owner: joedolson
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 6.5
Component: Media | Version: 3.9
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests 2nd- | Focuses: ui,
opinion | administration
-------------------------------------------------+-------------------------
Changes (by joedolson):
* keywords: has-patch has-unit-tests => has-patch has-unit-tests 2nd-
opinion
Comment:
The problem is that both sets of files are still present, so both sets of
files are added to the icon_files array. *Which* file is used depends on
the order the files are iterated in. We still have to support the
possibility of .png files, because these could be customized, but need to
prioritize the SVG in core.
It's probably an OS or filesystem thing, but I didn't investigate that
further once I determined the root problem.
In the PR, I added a function argument to prefer the svg extension,
defaulted to svg. We could also default to png, but add the parameter to
uses of this function. As I have it, it'll be a potential problem for
anybody passing a custom icon directory that does not contain SVG files.
There are a lot of plugins that filter this, so having this as a default
is probably not a great plan. Core doesn't call the function frequently,
so it's not a major change to just add a parameter where needed.
Requesting 2nd opinions.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31352#comment:45>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list