[wp-trac] [WordPress Trac] #21819: Use an image size for custom headers instead of duplicating an attachment
WordPress Trac
noreply at wordpress.org
Thu Sep 28 19:27:06 UTC 2017
#21819: Use an image size for custom headers instead of duplicating an attachment
-------------------------+------------------------
Reporter: koopersmith | Owner: joemcgill
Type: enhancement | Status: assigned
Priority: high | Milestone: 4.9
Component: Media | Version: 3.5
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
-------------------------+------------------------
Comment (by joemcgill):
As discussed in the Media component meeting, the approach we want to
pursue for 4.9 is as follows:
1. Try replacing existing crops of an image which has been cropped in the
same context (e.g., custom header, site icon, etc). We had two potential
ideas for handling this (either is acceptable, unless we discover a strong
preference during implementation/discussion):
* Create a new attachment and delete the existing crop attachment
* Update the file paths on the existing crop attachment
2. When showing the media library in a post context, we should attempt to
hide crops that were created in a Customizer context. Note that we can
make use of the `_wp_attachment_context` meta value for this, but we
should't query that value specifically, because meta values are unindexed
and will cause performance issues.
We had some discussion about cleaning up orphaned image files after crop
replacement, and while we should consider improvements here, it's safer
for now to leave these files in place, which is consistent with current
behavior in other parts of core.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/21819#comment:36>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list