Opened 7 years ago

Closed 7 years ago

#2749 closed defect (bug) (wontfix)

SVG Icons in plugin directory sometimes repeated or cropped

Reported by: mattkeys's profile mattkeys Owned by:
Milestone: Priority: normal
Component: Plugin Directory Keywords:


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:

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)

#1 @Otto42
7 years ago

Your icon is not square. Can you make it square and see if that fixes the issue?

#2 @mattkeys
7 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 @Otto42
7 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.

This ticket was mentioned in Slack in #meta by tellyworth. View the logs.

7 years ago

#5 @Otto42
7 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

Icons are square unless we have a compelling reason to change them.

Note: See TracTickets for help on using tickets.