Opened 7 years ago
Closed 7 years ago
#3265 closed defect (bug) (fixed)
Serve auto-generated plugin icons via URL
Reported by: | dd32 | Owned by: | dd32 |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Plugin Directory | Keywords: | |
Cc: |
Description
Currently the plugins auto-generated icons are passed around as base64'd data uri SVG's and output directly onto pages, and passed back directly to be displayed inline by clients.
For example, the Debug Bar plugin has this in it's source:
<style>#plugin-icon-debug-bar { background-image: url('data:image/svg+xml;base64,....
With WordPress 4.9 displaying plugin icons in the update list, plugins which only have the auto-generated icon are not shown as the data wasn't available to the update API (as it's generated on every request where needed).
It'd be far simpler if these were available through a cached-SVG request, for example:
https://s.w.org/plugins/generated-plugin-icon?name=$plugin&color=$color
which would allow embedding into plugins pages, as well as being served as a fallback SVG in the APIs.
Change History (12)
This ticket was mentioned in Slack in #meta by tellyworth. View the logs.
7 years ago
#3
@
7 years ago
- Owner set to Otto42
- Status changed from new to accepted
Agreed, I'll take a look at it.
#9
@
7 years ago
That takes care of https://WordPress.org/plugins/ and the plugins/info
api endpoint.
Still remaining is fixing up the plugins/update-check
api to use the new svg.
In doing so, we should probably update it to insert a column in the update_source
table for assets
which contains the banners/icons rather than rebuilding it in the API.
Good idea