Opened 8 years ago
Closed 8 years ago
#2749 closed defect (bug) (wontfix)
SVG Icons in plugin directory sometimes repeated or cropped
Reported by: | mattkeys | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Plugin Directory | Keywords: | |
Cc: |
Description
I noticed that the icon for my Google Pagespeed Insights for WordPress plugin is not displaying very nicely with the new directory facelift. Both in search results and on the plugin detail page. Examples:
https://wordpress.org/plugins/search/pagespeed/
https://wordpress.org/plugins/google-pagespeed-insights/
In search results, the image is cropped, on the detail page it repeats itself.
In both cases adding the following CSS to the div with class 'plugin-icon' makes it look better:
background-position: center center;
background-repeat: no-repeat;
In the case of the search results page, using background-size "contain" instead of "cover" further improves things.
I can submit a patch although I am struggling to figure out where the source of this CSS is for me to create a diff from. Any pointers appreciated.
Change History (5)
#2
@
8 years ago
Yes definitely can fix my icon directly, I just figured there may be more out there like mine that used to work but no longer are, so a CSS solution could be beneficial.
However if the fix here is for effected authors to update their icons, I am fine with that too. I am sure my icon doesn't conform to the specs since it is not square, but I never noticed before as it still worked well on the site.
#3
@
8 years ago
If it worked before, then that was likely coincidental, not by design. We have always assumed icons to be square. The two supported sizes of 128x128 and 256x256 for icons as image files are also square.
So, yes, I would say that an icon needs to be square, and that we're not going to add support for other ratios at this time.
Your icon is not square. Can you make it square and see if that fixes the issue?